Comments (9)
Hi @ChelsyMena, thanks for reporting this issue. I'm sorry to hear you're having trouble getting the code to work. Do you have a working Latex installation on your system, including latexmk? As that is what is used to create the Tex time line.
You might be able to test this by running:
>>> from labella.tex import text_dimensions
>>> text_dimensions("foo", silent=False)
from labella.py.
Closing due to inactivity. Please reopen if the issue persists.
from labella.py.
Hello,
What is meant by: Do you have a working Latex installation on your system, including latexmk?
?
Besides pip install latexmk.py
, what else constitutes "installation"?
from labella.py.
from labella.py.
Wow..heck of a set of pre-req's for Windows.
From https://ctan.math.utah.edu/ctan/tex-archive/support/latexmk/INSTALL
:
1. Make sure you have working installations of Perl and TeX/LaTeX,
complete with viewers for dvi, postscript and/or pdf files. You will
also need whatever packages your document needs.
2. If necessary, unpack the latexmk distribution.
3. **Difference compared with UNIX-type systems**: Copy the file
latexmk.pl to a suitable directory (your choice), and arrange for it to
be invoked as a command. (If you don't know how to do this, find out
about "executable extension for perl on windows", by a web search.)
For those who come after, looking for Windows 10 instructions:
Determine if Perl is installed
Add / Remove Programs
- Search for "Perl"
- No results
Download Perl for Windows 10
- Go to
perl.org
and download- Went with "Strawberry Perl"
- Select 32 vs 64 bit
- Install:
Next
Accept
Next
- Select location
C:\Strawberry\
Install
- Approve
- (takes a fair amount of time to download!)
Finish
Determine if "TeX/LaTeX" is installed
Add / Remove Programs
- Search for "TeX" and "LaTeX"
- No results
Download TeX/LaTeX for Windows 10
- Visit to
https://miktex.org/download
Download
Accept
Next
Install for me or all users?
Next
- Select location:
C:\Users\<you>\AppData\Local\Programs\MiKTeX
Next
- Set:
Preferred paper
:A4
andInstall missing packages on-the-fly
:Ask me first
Next
Start
- (takes a fair amount of time to download too!)
Next
Check for updates now
: CheckedNext
Close
Download the latexmk
package from MiKTeX
- Open
MiKTeX
- You'll probably get a popup stating "Check for updates"
- Click
Ok
- Click
- OPTIONAL:
- Click
Updates
tab Check for updates
- WARNING: I have no idea what these are packages are doing. DO NOT download them until you know they are safe
- Click
- Click
Packages
tab - In the search bar, type
latexmk
- Hit
Enter
- Select
latexmk
- Click the
+
icon Ok
- When download is complete, click
Close
Test PATH
variable
- Open a
cmd
/PowerShell/etc terminal - Type
latexmk -h
- If the results are an error like this:
- The
latexmk
package (program?) added in previous step must be added to yourPATH
variable
- The
latexmk : The term 'latexmk' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ latexmk -h
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (latexmk:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Place latexmk
in the Users' PATH
variable
- Click Windows button on keyboard
- Type
env
- Select the result
Edit environment variables for your account
- NOTE: This only installs the program for the particular User (You!)
- You may want to read-up on
User vs. System env variables
before setting the SystemPATH
env var
- Click
Environment Variables
- Under
User variables for <yourUserName>
, double click thePath
variable - Click
New
- Unless you change it, MiKTeX installs packages in the following directory.
C:\Users\<you>\AppData\Local\Programs\MiKTeX\miktex\bin\x64
- Add
\latexmk.exe
to the above path and paste the whole exe path into the new field - Should be:
C:\Users\<you>\AppData\Local\Programs\MiKTeX\miktex\bin\x64\latexmk.exe
- IMPORTANT: CLOSE THEN OPEN (RESTART) YOUR TERMINAL WINDOW
- There isn't a (easy) way to
source bash.rc
your Windowscmd
terminal. - You must close/reopen the terminal for the
PATH
environmental variable to be refreshed
- There isn't a (easy) way to
Verify PATH
variable
- Open a new
cmd
/PowerShell/etc terminal - Type
latexmk -h
- Results should look like this:
Latexmk 4.76: Automatic LaTeX document generation routine
Usage: latexmk [latexmk_options] [filename ...]
Latexmk_options:
-aux-directory=dir or -auxdir=dir
- set name of directory for auxiliary files (aux, log)
- Currently this only works with MiKTeX
...<con't>...
Run latexmk
with the option -showextraoptions to see a list of these
Report bugs etc to John Collins <jcc8 at psu.edu>.
Additional cleanup
- When you initially try to run your Python script (say
python .\timeline.py
), you will get an notification from MiKTeX: - Click
Install
CTRL+z
the execution of your script- Rerun
python .\timeline.py
- If you're using the
examples
,ls
should yield a.pdf
, '.svg
, and a.tex
file - PDF:
- SVG:
- TEX:
from labella.py.
from labella.py.
I also have MiKTeX
added to PATH
variable. Still getting FileNotFoundError: [WinError 2] The system cannot find the file specified
.
from labella.py.
from labella.py.
RE: Pull Request:
- I'd probably just PR the
README.md
and add - "For Windows instructions, see here".
I have to actually see if this tool is going to work for my use case!
Thank you!
from labella.py.
Related Issues (15)
- Implement logscale
- textStyle example HOT 4
- borderColor not working HOT 3
- Gantt chart HOT 2
- Horizontal Timeline up and down HOT 1
- Latexmk issue within Conda Env HOT 14
- FileNotFoundError: [WinError 2] The system cannot find the file specified
- How to use URL hyperlinks for timeline events? HOT 4
- import error HOT 3
- How to convert timeline to .png? HOT 5
- How to adjust node size and font size? HOT 4
- latexmk issue HOT 4
- OSError: [Errno 22] Invalid argument on dt2milli HOT 2
- Width caluculation - switch to TikZ? HOT 3
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 labella.py.