Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with tkz packages #105

Closed
few opened this issue Nov 18, 2011 · 18 comments
Closed

Problems with tkz packages #105

few opened this issue Nov 18, 2011 · 18 comments

Comments

@few
Copy link

few commented Nov 18, 2011

I just noticed that even though I have the latex use flag for sage enabled dev-tex/tkz-berge and dev-tex/tkz-graph aren't installed. This lets sage print 'Unknown environment "tikzpicture"' in the notebook on some commands (e.g. view(Graph(4)).

I went to install these two but at least dev-tex/tkz-graph fails to fetch.

Downloading 'http://altermundus.com/downloads/packages/tkz-graph.sty'
--2011-11-18 17:50:49-- http://altermundus.com/downloads/packages/tkz-graph.sty
Resolving altermundus.com... 70.85.241.114
Connecting to altermundus.com|70.85.241.114|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2011-11-18 17:50:49 ERROR 404: Not Found.

!!! Couldn't download 'tkz-graph.sty'. Aborting.

  • Fetch failed for 'dev-tex/tkz-graph-2.7d', Log file:
  • '/home/root/buildlogs/dev-tex:tkz-graph-2.7d:20111118-165049.log'
@kiwifb
Copy link
Collaborator

kiwifb commented Nov 18, 2011

It is now on ctan, I will update this ASAP.

@kiwifb
Copy link
Collaborator

kiwifb commented Nov 18, 2011

OK I fixed it and tkz-berge. Since it has moved to ctan we may be able to package it better in the future.

@kiwifb kiwifb closed this as completed Nov 18, 2011
@few
Copy link
Author

few commented Nov 19, 2011

Now the check sums are wrong (see below). And what about the issue that nothing depends on them?

Downloading 'http://www.ctan.org/tex-archive/macros/latex/contrib/tkz/tkz-graph/latextkz-graph.sty'
--2011-11-19 06:51:52-- http://www.ctan.org/tex-archive/macros/latex/contrib/tkz/tkz-graph/latextkz-graph.sty
Resolving www.ctan.org... 192.80.64.33
Connecting to www.ctan.org|192.80.64.33|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `/usr/portage/distfiles/latextkz-graph.sty'

 0K ....                                                   6.64M=0.001s

2011-11-19 06:51:53 (6.64 MB/s) - `/usr/portage/distfiles/latextkz-graph.sty' saved [4413]

('Filesize does not match recorded size', 4413L, 4151)
!!! Fetched file: latextkz-graph.sty VERIFY FAILED!
!!! Reason: Filesize does not match recorded size
!!! Got: 4413
!!! Expected: 4151
Refetching... File renamed to '/usr/portage/distfiles/latextkz-graph.sty.checksum_failure.CuvIhz'

!!! Couldn't download 'latextkz-graph.sty'. Aborting.

  • Fetch failed for 'dev-tex/tkz-graph-2.7d', Log file:
  • '/home/root/buildlogs/dev-tex:tkz-graph-2.7d:20111119-055152.log'

@kiwifb
Copy link
Collaborator

kiwifb commented Nov 19, 2011

Sorry I made an horrible typo and forgot a "/". Dependency, we decided some time ago that it was pretty much optional as a package especially since we didn't it to build sage-latex which we had included it in the first place. I presume you fell it is wrong?

@few
Copy link
Author

few commented Nov 19, 2011

Thanks, both merged fine now.

What I expect is that latex commands just work when the latex use flag is enabled. Which brings me back to the original problem. Even after merging these two packages I still get the "Unknown environment "tikzpicture"' error. Any idea what I'm missing?

@few
Copy link
Author

few commented Nov 19, 2011

Digging a bit deeper I get:
! LaTeX Error: File `tkz-tools-arith.tex' not found.

@few
Copy link
Author

few commented Nov 19, 2011

It's part of texlive-pictures-2011 (not 2010), which isn't stable... Not sure what to do here. Could you add a separate package for this? I don't feel like going ~arch with texlive.

@kiwifb kiwifb reopened this Nov 19, 2011
@kiwifb
Copy link
Collaborator

kiwifb commented Nov 19, 2011

It's part of tkz-base. I am having trouble getting it to install. It is probably a better idea to use g-ctan it is unstable as well but you may be able to install it as part of texlive-2010. I am testing it.

@kiwifb
Copy link
Collaborator

kiwifb commented Nov 19, 2011

No go with g-ctan-2010.2 unfortunately. I'll try to sort out the installation of the .tex files which is what is not working at the moment. Ideas welcome.

@kiwifb
Copy link
Collaborator

kiwifb commented Nov 19, 2011

Oh blast! that makes things complicated, from the latex-package eclass manpage:

NOTE: The CTAN "directory grab" function creates files with different MD5 signatures EVERY TIME. For this reason, if you are grabbing from the CTAN, you must either grab each file individually, or find a place to mirror an archive of them.

@kiwifb
Copy link
Collaborator

kiwifb commented Nov 20, 2011

I put something hackish together, see if it works. If it is provided by texlive-pictures-2011 I'll put some blockers. We should just drop those ebuilds once texlive-2011 gets stable.

@few
Copy link
Author

few commented Nov 20, 2011

Thanks for all the work you're putting into this!

tkz-base installed just fine. I noticed that texlive-pictures contains all three tkz packages in the overlay. I suggest to add a dep of the form latex? ( || ( >=dev-texlive/texlive-pictures-2011 ( dev-tex/tkz-base dev-tex/tkz-berge dev-tex/tkz-graph ) ) ) to sage or sage-latex.

I guess there should be a dep between tkz-{berge,graph} and tkz-base.
And tkz-base should be added to the package.unmask file.

Now back to the problem:
g=Graph(4)
view(g)
Still gives the same error message.

What works now is:
latex(g)
#copy the output to another cell, add %latex on top and execute it.
This gives the expected picture.

I tried passing debug=True to view, but it doesn't give a clue. Any idea how to debug further?
view() is not completely broken btw. Thinks like view(3) work.

@few
Copy link
Author

few commented Nov 20, 2011

While digging through [1], I found that some things require dev-tex/dot2tex and media-gfx/graphviz (the latter requires the following use changes: media-libs/gd truetype fontconfig).

[1] http://www.sagemath.org/doc/reference/sage/graphs/graph_latex.html

@kiwifb
Copy link
Collaborator

kiwifb commented Nov 20, 2011

OK we will have to fix all this dependency mess. Once this is sorted we will probably have a more complete support for latex stuff out of the box than upstream sage has :)

@strogdon
Copy link
Contributor

The fact that the latex code with the \begin{tikzpicture} ... \end{tikzpicture} environment can be placed in a cell with a beginning %latex seems to indicate that the notebook "knows" about tikzpicture. I believe this environment is provided by
dev-tex/pgf-2.10. I have just texlive-2010 with pgf, tkz-berge and tkz-graph installed here and the following works for me from the notebook:

latex.add_to_jsmath_avoid_list("tikzpicture")
g=Graph(4)
view(g)

See view? from the sage prompt. I'm not sure if there is a way to avoid the
latex.add_to_jsmath_avoid_list("tikzpicture") but maybe, aside from the dependencies, all is well.

@strogdon
Copy link
Contributor

I guess I had too many windows opened. The latex.add_to_jsmath_avoid_list("tikzpicture") did not come from the online sage documentation for "view" but from site-packages/sage/misc/latex.py, i.e.

To use, first try calling 'view' on this object -- you should get
gibberish. Now, make sure that you have the most recent version of
the TeX package pgf installed, along with the LaTeX package tkz-graph.
Run 'latex.add_to_preamble("\usepackage{tkz-graph}")', and try viewing
it again. From the command line, this should pop open a nice window
with a picture of a graph. In the notebook, you should get a jsMath
error. Finally, run 'latex.add_to_jsmath_avoid_list("tikzpicture")'
and try again from the notebook -- you should get a nice picture.

@kiwifb
Copy link
Collaborator

kiwifb commented Nov 23, 2011

That's interesting. Can you comment on that few?

@kiwifb
Copy link
Collaborator

kiwifb commented May 24, 2014

Two year and a half without comments. I am closing this, re-open if you want to discuss the matter further.

@kiwifb kiwifb closed this as completed May 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants