brucemiller / LaTeXML

LaTeXML: a TeX and LaTeX to XML/HTML/ePub/MathML translator.
http://dlmf.nist.gov/LaTeXML/
Other
915 stars 96 forks source link

Figure not showing #544

Closed bernhard-kleine closed 9 years ago

bernhard-kleine commented 9 years ago

I have a figure:

\begin{figure*}[hbt]
  \centering \small
  \includegraphics[%
    % draft,%
    width=\figurewidth%
  ]%
  {Chap3/g/HP_Achsen}
           \caption{Endocrine regulation via hypothalamic--pituitary axes}\label{fig:hpaxes}
\end{figure*}

which does not show up while there is no error message. The relevant text in test1.html formed by

latexmlpost test1.xml --destination=test1.html --format=html5 --index

remains empty: <img src="" ...

<figure id="Ch3.F1" class="ltx_figure"><img src="" id="Ch3.F1.g1" class="ltx_graphics ltx_centering" alt="">
<figcaption class="ltx_caption ltx_centering ltx_font_small"><span class="ltx_tag ltx_tag_figure">Figure 3.1: </span>Endocrine regulation via hypothalamic–pituitary axes. </figcaption>
</figure>

In Chap3/g/ are both HPAchsen.pdf and HPAchsen.svg and HPAchsen.svg is one candidate mentioned in test1.xml:

 <figure frefnum="Figure 3.1" placement="hbt" refnum="3.1" xml:id="Ch3.F1" labels="LABEL:fig:hpaxes">
          <graphics candidates="Chap3\g\HPAchsen.pdf,Chap3\g\HPAchsen.svg,Chap3\g\HPAchsen.pdf,Chap3\g\HPAchsen.svg" graphic="Chap3/g/HPAchsen" options="width=327.206693pt" xml:id="Ch3.F1.g1" class="ltx_centering"/>

The figure as such is there with the caption but the image is lacking. please advise

brucemiller commented 9 years ago

Although getting the drive right on windows paths was useful (and probably heads off future errors), I think the form of paths is barking up the wrong tree, at this point.

I suspect that Deyan is right: it comes down to missing Image::Magick. And it turns out there was a corner case where the Warning about missing Image::Magick was not being given. I had warnings when Image::Magick was needed to do image transformations, but Image::Size will also invoke Image::Magick to determine an image's size, if it can't do it natively. I've added tests so that you should now get a warning in those cases, as well. And, I've modified the code to go ahead and generate the correct markup even when it can't find the image size --- it just omits the size information.

So, I think the current code should now work correctly, but will be less ideal when Image::Magick is unavailable, so I'll close this issue.

I've also updated the installation guide with instructions about installing Image::Magick on windows. (I think I'll reword a few things to be even more emphatic about not using CPAN here)

dginev commented 9 years ago

Just as a last note - I tried your Windows instructions and I still hit the exact same error I get when installing from CPAN. So for me a clean install of Image::Magick is still impossible.

brucemiller commented 9 years ago

Well, then you didn't follow the instructions! You should install the binary library from ImageMagick's site. Then fetch the tarball of the perl binding from the same site and install it from it's source. CPAN doesn't come into play at all.

dginev commented 9 years ago

Indeed it doesn't and it didn't, in this case I am not doing anything silly.

The tarball I grabbed from the ImageMagick site, just as the CPAN route, follows the basic MakeMaker procedure:

perl Makefile.PL
dmake
dmake test
dmake install

I am getting a single, identical, error from dmake test both when installing through CPAN (or cpanm), as well as when I am installing from source, with the tarball at http://imagemagick.com/download/perl/ .

But the error at least seems degenerate, and all other tests succeed, so I am assuming I have a working installation when I ignore testing.

brucemiller commented 9 years ago

[nevermind; crossed paths] OK. let's assume it installs correctly and cross our fingers...

dginev commented 9 years ago

as when yes, same test failure. Installing without testing works well. Installing with force didn't for some reason, I think the test involves some process dying which may be messing up stuff.

bernhard-kleine commented 9 years ago

I tested the test3.tex under linux. and as far as I tell with an image::magick installed. the path was recognized and still no image. could you please sent a file together with an svg image that works on your computer. I will then test your file first.

Bernhard

brucemiller commented 9 years ago

The important thing is the 2 lines of log output starting with "(Graphics ".. and "[Processing " ... when you run latexmlpost with 2 --verb's. No need to post the whole log or the xml/html file.

bernhard-kleine commented 9 years ago

I have under linux only version 0.70 and I ask you how to install version 0.9 this is the result of 0.70

bk@bk-amdbk:/media/Datenlaufwerk_BK/EigeneDateien/BuchprojektSpringer/XMLtestordner$ latexmlpost test3.xml --dest=test3.hmtl --form=html --verb --verb test3.xml
latexmlpost (LaTeXML version 0.7.0)
LaTeXML::Post::Scan[test3.hmtl]: Scanned; DBStatus: 2 objects
LaTeXML::Post::Scan[test3.hmtl]:  0.00 sec; 25744 KB
LaTeXML::Post::MakeIndex[test3.hmtl]:  0.00 sec; 25744 KB
LaTeXML::Post::CrossRef[test3.hmtl]: Beginning cross-references
LaTeXML::Post::CrossRef[test3.hmtl]: Filling in refs
LaTeXML::Post::CrossRef[test3.hmtl]: Filling in bibrefs
LaTeXML::Post::CrossRef[test3.hmtl]: done cross-references
LaTeXML::Post::CrossRef[test3.hmtl]:  0.00 sec; 25744 KB
LaTeXML::Post::MathImages[test3.hmtl]:  0.00 sec; 25744 KB
LaTeXML::Post::PictureImages[test3.hmtl]:  0.00 sec; 25744 KB
LaTeXML::Post::Graphics[test3.hmtl]: Using graphicspaths: ., /media/Datenlaufwerk_BK/EigeneDateien/BuchprojektSpringer/XMLtestordner/, /media/Datenlaufwerk_BK/EigeneDateien/BuchprojektSpringer/XMLtestordner
LaTeXML::Post::Graphics[test3.hmtl]: 1 graphics nodes to process
LaTeXML::Post::Graphics[test3.hmtl]: Warning: Missing graphic for <graphics graphic="orexine"/>; skipping
LaTeXML::Post::Graphics[test3.hmtl]:  0.02 sec; 25744 KB
LaTeXML::Post::XSLT[test3.hmtl]:  0.00 sec; 25744 KB
LaTeXML::Post::Writer[test3.hmtl]: Writing test3.hmtl
LaTeXML::Post::Writer[test3.hmtl]:  0.00 sec; 25744 KB

the svg file is in the same directory as the test file.

bernhard-kleine commented 9 years ago

this testfile is working:

#!/usr/bin/perl
  use Image::Magick;
  my($image, $x);
  $image = Image::Magick->new;
  $x = $image->Read('Ringelnatter_20130722.jpg', 'orexine.svg');
  warn "$x" if "$x";
  $x = $image->Crop(geometry=>'1000x1000+100+100');
  warn "$x" if "$x";
  $x = $image->Write('x.png');
  warn "$x" if "$x";

and produces a x-0.png and x-1.png

brucemiller commented 9 years ago

That last test suggests that Image::Magick is working. How did you even find a 0.7.0 to install? 0.8.0 should be available in the repository. Even so, there have been so many changes since 0.8.0, particularly regarding paths, svg and graphics, that I wouldn't wonder that it failed somehow.

There is no 0.9.0, but we will be releasing 0.8.1 in the next few weeks. However, since you're such a prolific bug reporter, you'll probably benefit from using the version from github. It should install pretty much the same way on linux as on windows; see the instructions at http://dlmf.nist.gov/LaTeXML/

bernhard-kleine commented 9 years ago

installing from git:

git version 1.7.9.5
/usr/local/share/texmf
Checking if your kit is complete...
Warning: the following files are missing in your kit:
    t/theorem/apackage.sty
    t/theorem/apackage.sty.ltxml
    t/theorem/myclass.cls
    t/theorem/myclass.cls.ltxml
    t/theorem/options.pdf
    t/theorem/options.tex
    t/theorem/options.xml
Please inform the author.

the test all fail

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_tokenize.t ........ Can't locate JSON/XS.pm in @INC (@INC contains: /home/bk/LaTeXML/blib/lib /home/bk/LaTeXML/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 7.
BEGIN failed--compilation aborted at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 7.
Compilation failed in require at t/00_tokenize.t line 5.
BEGIN failed--compilation aborted at t/00_tokenize.t line 5.
t/00_tokenize.t ........ Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 

what do I need?

bernhard-kleine commented 9 years ago

I solved that problem. Two cpan modules JSON::Xs and File::Which were missing. make test has many errors:

bk@bk-amdbk:~/LaTeXML$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_tokenize.t ........ ok   
t/10_expansion.t ....... ok    
t/12_grouping.t ........ ok   
t/20_digestion.t ....... ok   
t/22_fonts.t ........... ok    
t/30_encoding.t ........ ok    
t/40_math.t ............ ok   
t/50_structure.t ....... ok    
t/52_namespace.t ....... ok   
t/53_alignment.t ....... 17/? 
#   Failed test 't/alignment/vmode'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Couldn't convert t/alignment/vmode.tex: 0
# Looks like you failed 1 test of 17.
t/53_alignment.t ....... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/17 subtests 
t/55_theorem.t ......... ok   
t/56_ams.t ............. ok   
t/65_graphics.t ........ 5/? 
#   Failed test 't/graphics/graphrot'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Couldn't convert t/graphics/graphrot.tex: 0
t/65_graphics.t ........ 9/? # Looks like you failed 1 test of 9.
t/65_graphics.t ........ Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/9 subtests 
t/70_parse.t ........... ok    
t/80_complex.t ......... 2/? 
#   Failed test 't/complex/aliceblog'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Couldn't convert t/complex/aliceblog.tex: 0
t/80_complex.t ......... 4/? # Looks like you failed 1 test of 4.
t/80_complex.t ......... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/4 subtests 
t/81_babel.t ........... ok   
t/90_latexmlpost.t ..... ok   
t/91_latexmlc_api.t .... 1/? 
#   Failed test 'latexmlc invocation for test port'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
#          got: '512'
#     expected: '0'

#   Failed test 't/daemon/api/port'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/api/port
#       got : ''
#  expected : '<Math mode="inline" xml:id="p2.m1" tex="1+2=3" text="1 + 2 = 3" fragid="p2.m1">'

#   Failed test 't/daemon/api/port'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/api/port
#       got : 'Can't locate IO/String.pm in @INC (@INC contains: /home/bk/LaTeXML/blib/script/../lib /home/bk/LaTeXML/blib/lib /home/bk/LaTeXML/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/bk/LaTeXML/blib/script/../lib/LaTeXML/Util/Pack.pm line 19.'
#  expected : 'No obvious problems'
# Looks like you failed 3 tests of 4.
t/91_latexmlc_api.t .... Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/4 subtests 
t/92_profiles.t ........ 1/? 
#   Failed test 'latexmlc invocation for test default'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
#          got: '512'
#     expected: '0'

#   Failed test 't/daemon/profiles/default'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/profiles/default
#       got : ''
#  expected : '<?xml version="1.0" encoding="UTF-8"?>'

#   Failed test 't/daemon/profiles/default'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/profiles/default
#       got : 'Can't locate IO/String.pm in @INC (@INC contains: /home/bk/LaTeXML/blib/script/../lib /home/bk/LaTeXML/blib/lib /home/bk/LaTeXML/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/bk/LaTeXML/blib/script/../lib/LaTeXML/Util/Pack.pm line 19.'
#  expected : 'No obvious problems'
t/92_profiles.t ........ 5/? 
#   Failed test 'latexmlc invocation for test fragment'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
#          got: '512'
#     expected: '0'

#   Failed test 't/daemon/profiles/fragment'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/profiles/fragment
#       got : ''
#  expected : '<div xmlns="http://www.w3.org/1999/xhtml" class="ltx_document">'

#   Failed test 't/daemon/profiles/fragment'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/profiles/fragment
#       got : 'Can't locate IO/String.pm in @INC (@INC contains: /home/bk/LaTeXML/blib/script/../lib /home/bk/LaTeXML/blib/lib /home/bk/LaTeXML/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/bk/LaTeXML/blib/script/../lib/LaTeXML/Util/Pack.pm line 19.'
#  expected : 'No obvious problems'
t/92_profiles.t ........ 8/? 
#   Failed test 'latexmlc invocation for test math'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
#          got: '512'
#     expected: '0'

#   Failed test 't/daemon/profiles/math'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/profiles/math
#       got : ''
#  expected : '<math xmlns="http://www.w3.org/1998/Math/MathML" id="p1.1.m1.1" class="ltx_Math" alttext="1+2=3" display="inline">'

#   Failed test 't/daemon/profiles/math'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/profiles/math
#       got : 'Can't locate IO/String.pm in @INC (@INC contains: /home/bk/LaTeXML/blib/script/../lib /home/bk/LaTeXML/blib/lib /home/bk/LaTeXML/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/bk/LaTeXML/blib/script/../lib/LaTeXML/Util/Pack.pm line 19.'
#  expected : 'No obvious problems'

#   Failed test 'latexmlc invocation for test standard'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
#          got: '512'
#     expected: '0'

#   Failed test 't/daemon/profiles/standard'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/profiles/standard
#       got : ''
#  expected : '<?xml version="1.0" encoding="UTF-8"?>'

#   Failed test 't/daemon/profiles/standard'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/profiles/standard
#       got : 'Can't locate IO/String.pm in @INC (@INC contains: /home/bk/LaTeXML/blib/script/../lib /home/bk/LaTeXML/blib/lib /home/bk/LaTeXML/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/bk/LaTeXML/blib/script/../lib/LaTeXML/Util/Pack.pm line 19.'
#  expected : 'No obvious problems'
# Looks like you failed 12 tests of 13.
t/92_profiles.t ........ Dubious, test returned 12 (wstat 3072, 0xc00)
Failed 12/13 subtests 
t/93_formats.t ......... 1/? 
#   Failed test 'latexmlc invocation for test citation'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
#          got: '512'
#     expected: '0'

#   Failed test 't/daemon/formats/citation'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/formats/citation
#       got : ''
#  expected : '<?xml version="1.0" encoding="utf-8"?>'

#   Failed test 't/daemon/formats/citation'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/formats/citation
#       got : 'Can't locate IO/String.pm in @INC (@INC contains: /home/bk/LaTeXML/blib/script/../lib /home/bk/LaTeXML/blib/lib /home/bk/LaTeXML/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/bk/LaTeXML/blib/script/../lib/LaTeXML/Util/Pack.pm line 19.'
#  expected : 'No obvious problems'
t/93_formats.t ......... 5/? 
#   Failed test 'latexmlc invocation for test citationraw'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
#          got: '512'
#     expected: '0'

#   Failed test 't/daemon/formats/citationraw'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/formats/citationraw
#       got : ''
#  expected : '<?xml version="1.0" encoding="utf-8"?>'

#   Failed test 't/daemon/formats/citationraw'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/formats/citationraw
#       got : 'Can't locate IO/String.pm in @INC (@INC contains: /home/bk/LaTeXML/blib/script/../lib /home/bk/LaTeXML/blib/lib /home/bk/LaTeXML/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/bk/LaTeXML/blib/script/../lib/LaTeXML/Util/Pack.pm line 19.'
#  expected : 'No obvious problems'

#   Failed test 'latexmlc invocation for test makebib'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
#          got: '512'
#     expected: '0'

#   Failed test 't/daemon/formats/makebib'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/formats/makebib
#       got : ''
#  expected : '<?xml version="1.0" encoding="UTF-8"?>'

#   Failed test 't/daemon/formats/makebib'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/formats/makebib
#       got : 'Can't locate IO/String.pm in @INC (@INC contains: /home/bk/LaTeXML/blib/script/../lib /home/bk/LaTeXML/blib/lib /home/bk/LaTeXML/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/bk/LaTeXML/blib/script/../lib/LaTeXML/Util/Pack.pm line 19.'
#  expected : 'No obvious problems'
t/93_formats.t ......... 11/? 
#   Failed test 'latexmlc invocation for test noparse'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
#          got: '512'
#     expected: '0'

#   Failed test 't/daemon/formats/noparse'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/formats/noparse
#       got : ''
#  expected : '<?xml version="1.0" encoding="UTF-8"?>'

#   Failed test 't/daemon/formats/noparse'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/formats/noparse
#       got : 'Can't locate IO/String.pm in @INC (@INC contains: /home/bk/LaTeXML/blib/script/../lib /home/bk/LaTeXML/blib/lib /home/bk/LaTeXML/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/bk/LaTeXML/blib/script/../lib/LaTeXML/Util/Pack.pm line 19.'
#  expected : 'No obvious problems'
t/93_formats.t ......... 14/? 
#   Failed test 'latexmlc invocation for test parallel-math-cmml'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
#          got: '512'
#     expected: '0'

#   Failed test 't/daemon/formats/parallel-math-cmml'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/formats/parallel-math-cmml
#       got : ''
#  expected : '<math xmlns="http://www.w3.org/1998/Math/MathML" id="p2.m1" class="ltx_Math" alttext="1+2=3" display="inline">'

#   Failed test 't/daemon/formats/parallel-math-cmml'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/formats/parallel-math-cmml
#       got : 'Can't locate IO/String.pm in @INC (@INC contains: /home/bk/LaTeXML/blib/script/../lib /home/bk/LaTeXML/blib/lib /home/bk/LaTeXML/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/bk/LaTeXML/blib/script/../lib/LaTeXML/Util/Pack.pm line 19.'
#  expected : 'No obvious problems'

#   Failed test 'latexmlc invocation for test parallel-math-om'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
#          got: '512'
#     expected: '0'

#   Failed test 't/daemon/formats/parallel-math-om'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/formats/parallel-math-om
#       got : ''
#  expected : '<Math mode="inline" xml:id="p2.m1" tex="1+2=3" text="1 + 2 = 3" fragid="p2.m1">'

#   Failed test 't/daemon/formats/parallel-math-om'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/formats/parallel-math-om
#       got : 'Can't locate IO/String.pm in @INC (@INC contains: /home/bk/LaTeXML/blib/script/../lib /home/bk/LaTeXML/blib/lib /home/bk/LaTeXML/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/bk/LaTeXML/blib/script/../lib/LaTeXML/Util/Pack.pm line 19.'
#  expected : 'No obvious problems'
t/93_formats.t ......... 20/? 
#   Failed test 'latexmlc invocation for test parallel-math-pmml'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
#          got: '512'
#     expected: '0'

#   Failed test 't/daemon/formats/parallel-math-pmml'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/formats/parallel-math-pmml
#       got : ''
#  expected : '<math xmlns="http://www.w3.org/1998/Math/MathML" id="p2.m1" class="ltx_Math" alttext="1+2=3" display="inline">'

#   Failed test 't/daemon/formats/parallel-math-pmml'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/formats/parallel-math-pmml
#       got : 'Can't locate IO/String.pm in @INC (@INC contains: /home/bk/LaTeXML/blib/script/../lib /home/bk/LaTeXML/blib/lib /home/bk/LaTeXML/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/bk/LaTeXML/blib/script/../lib/LaTeXML/Util/Pack.pm line 19.'
#  expected : 'No obvious problems'

#   Failed test 'latexmlc invocation for test parallel-math-xmath'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
#          got: '512'
#     expected: '0'

#   Failed test 't/daemon/formats/parallel-math-xmath'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/formats/parallel-math-xmath
#       got : ''
#  expected : '<Math mode="inline" xml:id="p2.m1" tex="1+2=3" text="1 + 2 = 3" fragid="p2.m1">'

#   Failed test 't/daemon/formats/parallel-math-xmath'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/formats/parallel-math-xmath
#       got : 'Can't locate IO/String.pm in @INC (@INC contains: /home/bk/LaTeXML/blib/script/../lib /home/bk/LaTeXML/blib/lib /home/bk/LaTeXML/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/bk/LaTeXML/blib/script/../lib/LaTeXML/Util/Pack.pm line 19.'
#  expected : 'No obvious problems'
# Looks like you failed 24 tests of 25.
t/93_formats.t ......... Dubious, test returned 24 (wstat 6144, 0x1800)
Failed 24/25 subtests 
t/94_runtimes.t ........ 1/? 
#   Failed test 'latexmlc invocation for test timeout'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
#          got: '512'
#     expected: '0'

#   Failed test 't/daemon/runtimes/timeout'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/runtimes/timeout
#       got : 'Can't locate IO/String.pm in @INC (@INC contains: /home/bk/LaTeXML/blib/script/../lib /home/bk/LaTeXML/blib/lib /home/bk/LaTeXML/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/bk/LaTeXML/blib/script/../lib/LaTeXML/Util/Pack.pm line 19.'
#  expected : '2 fatal errors'
# Looks like you failed 2 tests of 4.
t/94_runtimes.t ........ Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/4 subtests 
t/95_complex_config.t .. 1/? 
#   Failed test 'latexmlc invocation for test exhaustive'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
#          got: '512'
#     expected: '0'

#   Failed test 't/daemon/complex/exhaustive'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/complex/exhaustive
#       got : ''
#  expected : '<?xml version="1.0" encoding="UTF-8"?>'

#   Failed test 't/daemon/complex/exhaustive'
#   at /home/bk/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/complex/exhaustive
#       got : 'Can't locate IO/String.pm in @INC (@INC contains: /home/bk/LaTeXML/blib/script/../lib /home/bk/LaTeXML/blib/lib /home/bk/LaTeXML/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/bk/LaTeXML/blib/script/../lib/LaTeXML/Util/Pack.pm line 19.'
#  expected : 'No obvious problems'
# Looks like you failed 3 tests of 4.
t/95_complex_config.t .. Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/4 subtests 

Test Summary Report
-------------------
t/53_alignment.t     (Wstat: 256 Tests: 17 Failed: 1)
  Failed test:  17
  Non-zero exit status: 1
t/65_graphics.t      (Wstat: 256 Tests: 9 Failed: 1)
  Failed test:  5
  Non-zero exit status: 1
t/80_complex.t       (Wstat: 256 Tests: 4 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
t/91_latexmlc_api.t  (Wstat: 768 Tests: 4 Failed: 3)
  Failed tests:  2-4
  Non-zero exit status: 3
t/92_profiles.t      (Wstat: 3072 Tests: 13 Failed: 12)
  Failed tests:  2-13
  Non-zero exit status: 12
t/93_formats.t       (Wstat: 6144 Tests: 25 Failed: 24)
  Failed tests:  2-25
  Non-zero exit status: 24
t/94_runtimes.t      (Wstat: 512 Tests: 4 Failed: 2)
  Failed tests:  2, 4
  Non-zero exit status: 2
t/95_complex_config.t (Wstat: 768 Tests: 4 Failed: 3)
  Failed tests:  2-4
  Non-zero exit status: 3
Files=22, Tests=228, 477 wallclock secs ( 0.21 usr  0.05 sys + 444.86 cusr 28.79 csys = 473.91 CPU)
Result: FAIL
Failed 8/22 test programs. 47/228 subtests failed.
make: *** [test_dynamic] Fehler 3
bk@bk-amdbk:~/LaTeXML$ 
bernhard-kleine commented 9 years ago

Finally I got latexml running and it incorporated the SVG in the html file. Uff.

dginev commented 9 years ago

Avoiding the frustration of manually fetching all dependencies is why I tend to install LaTeXML with cpanminus whenever I use the GitHub repository. All it takes is:

 cpanm . 

in the LaTeXML directory cloned from GitHub, and all prerequisites will be fetched automatically. But it requires setting up your cpanminus paths first, so that the installation is visible later on.

Good job on installing successfully though.

bernhard-kleine commented 9 years ago

I got stuck again

(Graphics engverxml.html 87 to process... [Using graphicspaths: /home/bk/Springerxml, /home/bk/Springerxml]
Warning:perl:warn Perl warning
    Postprocessing LaTeXML::Post::Graphics engverxml.html
    Use of uninitialized value $pathname in pattern match (m//) at /home/bk/perl5/lib/perl5/LaTeXML/Util/Pathname.pm line 99.

Fatal:perl:die Perl died
    Postprocessing LaTeXML::Post::Graphics engverxml.html
    Undefined pathname! at /home/bk/perl5/lib/perl5/LaTeXML/Util/Pathname.pm line 102
        LaTeXML::Util::Pathname::pathname_canonical(undef) called at /home/bk/perl5/lib/perl5/LaTeXML/Util/Pathname.pm line 201
        LaTeXML::Util::Pathname::pathname_cwd() called at /home/bk/perl5/lib/perl5/LaTeXML/Util/Pathname.pm line 291
        LaTeXML::Util::Pathname::candidate_pathnames('Chap2/g/amenophisIV', 'types', 'ARRAY(0x808193a8)', 'paths', 'ARRAY(0x80824e20)') called at /home/bk/perl5/lib/perl5/LaTeXML/Util/Pathname.pm line 276
        LaTeXML::Util::Pathname::pathname_findall('Chap2/g/amenophisIV', 'paths', 'ARRAY(0x80824e20)', 'types', 'ARRAY(0x808193a8)') called at /home/bk/perl5/lib/perl5/LaTeXML/Post/Graphics.pm line 123
        LaTeXML::Post::Graphics::findGraphicFile('LaTeXML::Post::Graphics=HASH(0x45f0ac8)', 'LaTeXML::Post::Document=HASH(0x4189678)', 'XML::LibXML::Element=SCALAR(0x4878658)') called at /home/bk/perl5/lib/perl5/LaTeXML/Post/Graphics.pm line 170
        LaTeXML::Post::Graphics::processGraphic('LaTeXML::Post::Graphics=HASH(0x45f0ac8)', 'LaTeXML::Post::Document=HASH(0x4189678)', 'XML::LibXML::Element=SCALAR(0x4878658)') called at /home/bk/perl5/lib/perl5/LaTeXML/Post/Graphics.pm line 95
        LaTeXML::Post::Graphics::process('LaTeXML::Post::Graphics=HASH(0x45f0ac8)', 'LaTeXML::Post::Document=HASH(0x4189678)', 'XML::LibXML::Element=SCALAR(0x4878658)', 'XML::LibXML::Element=SCALAR(0x8081ee08)', 'XML::LibXML::Element=SCALAR(0x807d91c0)', 'XML::LibXML::Element=SCALAR(0x80816330)', 'XML::LibXML::Element=SCALAR(0x807d9190)', 'XML::LibXML::Element=SCALAR(0x80815898)', 'XML::LibXML::Element=SCALAR(0x400f6400)', ...) called at /home/bk/perl5/lib/perl5/LaTeXML/Post.pm line 50
        LaTeXML::Post::ProcessChain('LaTeXML::Post=HASH(0x48755d0)', 'LaTeXML::Post::Document=HASH(0x4189678)', 'LaTeXML::Post::Scan=HASH(0x4183da0)', 'LaTeXML::Post::MakeIndex=HASH(0x40f5c28)', 'LaTeXML::Post::MakeBibliography=HASH(0x44c23b0)', 'LaTeXML::Post::CrossRef=HASH(0x44c20f8)', 'LaTeXML::Post::Graphics=HASH(0x45f0ac8)', 'LaTeXML::Post::SVG=HASH(0x45f11e8)', 'LaTeXML::Post::MathML::Presentation=HASH(0x43a17b0)', ...) called at /home/bk/perl5/bin/latexmlpost line 448
 at /home/bk/perl5/lib/perl5/LaTeXML/Post/Graphics.pm line 123

What is missing?

dginev commented 9 years ago

Looking at the trace, It looks as if cwd() returned an empty path. I remember encountering a similar problem, that had to do with the filesystem I/O being under very heavy load and hitting bottlenecks.

Is this error reproducible? If you run the command 5 times, do you see it 5 out of 5?

bernhard-kleine commented 9 years ago

4 times out of four. I shortened the document and still the same error

bernhard-kleine commented 9 years ago

It worked. I have the five first chapters of my book as an html via xml. Great! There are still some errors, threeparttables not supported the most important aside from the acronym package errors. The figure are not fully visible but that will be a question for the publisher. Thank you very much. BTW: The pathnames for figures in the html are relative. That means I can move around the html as long that the underlying structure is copied, too. There will be more questions coming up but not related to figure not showing. This can be closed again. On linux yes, on windows no.

dginev commented 9 years ago

Why did it work? What changed? Was there a legitimate problem, or was it a matter of your local installation?

bernhard-kleine commented 9 years ago

I broke it down to the image and only the image in Tex. That worked. Then I eventually added back all the packages, macros, other chapters. I have not yet tested the bibliography which is quite large. May be it is a problem of space which here is 4 Gb x 2. But at least I can show it to the publisher.

edit: I had a Bib-file which was not stable since abstracts did not conform to tex: percent signs e.g. I removed all abstracts and that file works now with latexml. That means all citations, all figure, the strange :) macros I have and the acronyms all are supported, but acroextra and threeparttable. The latter can be edited on the xml level.

Von: Deyan Ginev [mailto:notifications@github.com] Gesendet: Sonntag, 23. November 2014 21:47 An: brucemiller/LaTeXML Cc: Bernhard Kleine Betreff: Re: [LaTeXML] Figure not showing (#544)

Why did it work? What changed? Was there a legitimate problem, or was it a matter of your local installation?

— Reply to this email directly or view it on GitHub https://github.com/brucemiller/LaTeXML/issues/544#issuecomment-64133930 . https://github.com/notifications/beacon/AIyh51q7djKzKLyR4mNI1CwftXqyPe3iks5nQj9WgaJpZM4CwPsI.gif

brucemiller commented 9 years ago

Busy!!! Too bad I can't easily reply on specific comments...

Finally, assuming things are working properly under linux, it would be very reassuring to verify that we can get it working under windows, as well. I think that you'll probably want to uninstall Image::Magick from CPAN (not sure: cpan uninstall Image::Magick ???) and then try installing both the core ImageMagick library and the perl binding (there are more details on LaTeXML's installation page). Deyan reported that he got an error during the test phase of make, but that the result still seemed to work.

bernhard-kleine commented 9 years ago

I have built a testcase, and it turns out it is a problem of the browser: when you open http://b-kleine.com/test/testverxml.html in Chrome the threeparts of svg are displayed: the labeling of the tree and the two figures while in Firefox nothing is seen. Very strange!

brucemiller commented 9 years ago

I'm seeing height=6 on the foreignObjects. Isn't that a patch that you had applied to get the labels visible? Perhaps it still is being applied? I don't think the current LaTeXML does that; should have 100%, I think.

bernhard-kleine commented 9 years ago

Yes I manipulated the html to make it visible. 6 is the smallest value to see the labels, now that they are visible it turns out that they are wrongly positioned. Any idea where I can change that?

bernhard-kleine commented 9 years ago

By the way, I am not familiar with "git pull". I use the zip file.

brucemiller commented 9 years ago

I assume you mean a zip file from github? If so, I would assume that it represents the current state of the repository; I've never used it myself.

Regarding you comment about "6". You have apparently made some changes on your end to get that "6", and maybe some other changes? You need to remove those changes before we can determine if LaTeXML is doing the right thing. Using the current LaTeXML labels seem always to be visible. Positioning seems usually close, sometimes slightly high, sometimes slightly low; LaTeXML probably has lost some information about size or baseline somewhere? At any rate, the labeled trees that you've given as examples seem to work pretty well for me.

At any rate, what you're talking about now, is not related to this issue, is it?

bernhard-kleine commented 9 years ago

The issue is svg figures not showing. I recognized that firefox has a problem and does not show the svg. Obviously the issue is misguiding.

brucemiller commented 9 years ago

Again: short example source & result. The page you've linked to above was not created by an unmodified LaTeXML, so there's really nothing I can do to fix it.