PiRSquared17 / wiki2latex

Automatically exported from code.google.com/p/wiki2latex
0 stars 0 forks source link

Embedded file (png image) returns fatal error #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Embed file in wiki
2. Generate downloadable file
3.

What is the expected output? What do you see instead?
I expect a latex file. I see this:
Fatal error: Call to a member function loadFromFile() on a non-object in
/var/www/wiki/extensions/w2l-0.10rc/w2lParser.php on line 945 

What version of Wiki2LaTeX are you using? On which Mediawiki version?
0.10rc. MediaWiki 1.13 (Apache / Ubuntu 9.04)

Please provide any additional information below.

Original issue reported on code.google.com by j...@johnbrondum.com on 2 Oct 2009 at 2:22

GoogleCodeExporter commented 9 years ago
the setup works fine using wiki2latex 0.92 on the same computer.

Original comment by j...@johnbrondum.com on 2 Oct 2009 at 2:26

GoogleCodeExporter commented 9 years ago
Thank you for reporting the issue. I will look into it and try to find out what
caused the issue.

Original comment by hansgeorg.kluge@gmail.com on 2 Oct 2009 at 8:06

GoogleCodeExporter commented 9 years ago
I should have mentioned that I was using a png file. Happy to help fixing the
problem, but I wasn't sure where to start :)

Original comment by j...@johnbrondum.com on 2 Oct 2009 at 8:14

GoogleCodeExporter commented 9 years ago
Hi,
I get the exact same problem with .jpg and .gif-images, regardless if I am 
generating
a TeX test, TeX file or trying to generate a pdf.
It seems that the image handling is a bit broken.

Thanks for a terrific extension. 
The possibilites are endless, to use a movie quote. :-)

//Nicklas

Original comment by nickl...@gmail.com on 21 Mar 2010 at 9:27

GoogleCodeExporter commented 9 years ago
Btw, .gif images doesn't seem to be visible in 0.92 either.

Original comment by nickl...@gmail.com on 21 Mar 2010 at 9:43

GoogleCodeExporter commented 9 years ago
Oh,sorry!

.gif is not supported by pdfLaTeX, so that's not wiki2LaTeX's fault.

But now I am looking  at vector images for use for logos, and stuff like that. 
.svg aren't supported by pdfLaTeX, byt .eps files are, AFAIK, and they don't 
show up
in pdf:s generated by wiki2LaTeX. Which I suppose that they should?

On the other hand, .eps:s don't show in the wiki anyway. 
It would just be great if there was a way to get vector graphics into wikimedia,
through wiki2LaTeX and into .pdf.

Original comment by nickl...@gmail.com on 21 Mar 2010 at 11:34

GoogleCodeExporter commented 9 years ago
That's one of the main issues regarding image-support: Images work totally 
different
on LaTeX (including file formats) compared to Mediawiki.

So the only way would be to include some converters. An SVG to EPS converter 
would be
great, as well as a Gif to JPEG converter.

But the issue here is a failing API Call to Mediawiki. I hope to be able to 
look into
it the next few days.

Original comment by hansgeorg.kluge@gmail.com on 21 Mar 2010 at 11:51

GoogleCodeExporter commented 9 years ago

Original comment by hansgeorg.kluge@gmail.com on 21 Mar 2010 at 11:52

GoogleCodeExporter commented 9 years ago
The problim is in this part of the code ($link variable is undefined):

            case NS_IMAGE:
                $parts = explode("|", $link);
                $imagename = array_shift($parts);
                $case_imagename = $imagename;
                // still need to remove the Namespace:
                $tmp_name = explode(':', $imagename, 2);
                $imagename = $tmp_name[1];

Original comment by ksee.zel...@gmail.com on 14 Jun 2010 at 11:33

GoogleCodeExporter commented 9 years ago
FIX: replace "$parts = explode("|", $link);" with "$parts = explode("|", 
$link_int);"

Original comment by ksee.zel...@gmail.com on 14 Jun 2010 at 11:36

GoogleCodeExporter commented 9 years ago
I added the tix of comment 10, hope it works :) I can't test it at this point :(

Original comment by hansgeorg.kluge@gmail.com on 29 Aug 2010 at 9:34

GoogleCodeExporter commented 9 years ago
Thank you very much for pointing out the fix for this

Original comment by hansgeorg.kluge@gmail.com on 29 Aug 2010 at 9:36