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

PostScript error: undefined in TeXDict #62

Closed
RubenVerborgh opened this issue Dec 30, 2016 · 16 comments
Closed

PostScript error: undefined in TeXDict #62

RubenVerborgh opened this issue Dec 30, 2016 · 16 comments
Assignees
Labels

Comments

@RubenVerborgh
Copy link

When converting a .dvi generated from a basic latex/TikZ example, I get the following with dvisvgm 2.0.4 on OS X 10.9.5:

WARNING: map file ps2pk.map not found
WARNING: map file dvipdfm.map not found
WARNING: map file psfonts.map not found
WARNING: none of the default map files could be foundpre-processing DVI file (format version 2)
WARNING: PostScript header file tex.pro not found
WARNING: PostScript header file texps.pro not found
WARNING: PostScript header file special.pro not found
PostScript error: undefined in TeXDict
@mgieseki
Copy link
Owner

Please make sure that dvips is installed on your system. dvisvgm requires the mentioned map and PS header files, which are part of the dvips package, to work properly. The PS error is probably triggered by calling an operator that's defined in one of the missing .pro files.

@RubenVerborgh
Copy link
Author

RubenVerborgh commented Dec 30, 2016

dvips seems installed:

$ which dvips
/Library/TeX/texbin/dvips

Maybe it's a path problem?

@mgieseki
Copy link
Owner

mgieseki commented Dec 30, 2016

Does $ kpsewhich tex.pro print the correct path to tex.pro? If yes, dvisvgm should find the file as well, except it's linked to a different kpathsea library with different settings. Do you use the dvisvgm binary that comes with your TeX distribution or did you install another one?

@RubenVerborgh
Copy link
Author

RubenVerborgh commented Dec 30, 2016

That seems to work:

$ kpsewhich tex.pro
/usr/local/texlive/2016/texmf-dist/dvips/base/tex.pro

I think it indeed uses the same kpathsea library; how can I be sure?
I compiled the dvisvgm library myself.

@mgieseki
Copy link
Owner

OK, where did you get the kpathsea development files (.h and .a/.so.a files)? Does the pre-built dvisvgm binary that comes with your TeX Live 2016 work correctly? If so, you most likely linked your own build to the wrong libkpathsea.

As a further check, you can compare the kpathsea versions printed by dvisvgm -V1 and kpsewhich --version. If the versions differ, it's another hint. On my Linux box they are identical:

$ dvisvgm -V1|grep kpathsea
kpathsea:    6.2.2
$ kpsewhich --version|grep kpathsea
kpathsea version 6.2.2

If the libraries are linked dynamically, ldd might give some insights too (not sure if ldd is available on Mac, maybe there is a similar utility):

$ ldd ./dvisvgm | grep kpathsea
	libkpathsea.so.6 => /lib64/libkpathsea.so.6 (0x00007f1e8f844000)
$ ldd /usr/bin/kpsewhich | grep kpathsea
	libkpathsea.so.6 => /lib64/libkpathsea.so.6 (0x00007faaa8081000)

So my binaries are obviously linked to the same kpathsea library.

@RubenVerborgh
Copy link
Author

The versions were the same, but I believe we're on the right track:

$ otool -L `which dvisvgm` | grep kpathsea
	/opt/local/lib/libkpathsea.6.dylib (compatibility version 9.0.0, current version 9.2.0)
$ otool -L `which kpsewhich`
/Library/TeX/texbin/kpsewhich:
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)

Strangely, my kpsewhich doesn't link to libkpathsea.6.dylib at all.

@mgieseki
Copy link
Owner

I see, then your TeX Live binaries, including kpsewhich, are probably linked statically. I guess, you have to get this static libkpathsea for TeX Live 2016 somewhere in order to link your own build against it.

@RubenVerborgh
Copy link
Author

Okay, thanks!

@parpalak
Copy link

parpalak commented Jan 3, 2017

Seems like I have the same problem. Could you please share the solution? Where can one get "this static libkpathsea for TeX Live 2016"?

I've installed a fresh TeX Live 2016 on a Debian server, and I want to try the latest version of dvisvgm. All I've found is this source of kpathsea, but there is no kpathsea.h file, so ./configure fails. Unfortunately, I'm not familiar with compiling sources. What is the next step?

BTW, thanks for the great software. I use dvisvgm in my online markdown & latex editor, and now I want to try woff fonts.

@mgieseki
Copy link
Owner

mgieseki commented Jan 4, 2017

Did you install TeX Live from the Debian packages or by downloading it from CTAN via install-tl/tlmgr? If you use the Debian packages, it should be easy to install the kpathsea development files. They are provided by libkpathsea-dev.
As far as I know, the maintainers of the "native" TeX Live don't provide the intermediate build files like the static libraries. Maybe someone on the TeX Live mailing lists can give some more details or even send you the required files.

I'm glad you find dvisvgm useful. I'll have a look at upmath later today and will play around a little with it.

@parpalak
Copy link

parpalak commented Jan 4, 2017

Hi, Martin,

Thanks for reply. I had installed TeX Live via install-tl, but I've realized I don't want to go further in this direction. So I've now installed texlive-full from Debian testing packages and successfully compiled and run dvisvgm.

@cooperstevenson
Copy link

I solved this issue by copying the compiled version of dvisvgm (~/src/dvisvgm/src/dvisvgm) to (in my case) /usr/local/texlive/2018/bin/x86_64-linux

@cooperstevenson
Copy link

The Arch Linux system provided the necessary header files in it's texlive package. If you need to compile kpathsea as a dynamicly linked executable for some reason, here's a pointer (section: "Build One Package"):
https://www.tug.org/texlive/doc/tlbuild.html#Overview-of-build-system

@Krasjet
Copy link

Krasjet commented Mar 21, 2020

I solved this issue by copying the compiled version of dvisvgm (~/src/dvisvgm/src/dvisvgm) to (in my case) /usr/local/texlive/2018/bin/x86_64-linux

In case anyone has the same problem, the directory you need to copy to can be found by kpsewhich -var-value SELFAUTOLOC. This workaround is ugly but it works.

@tmelorc
Copy link

tmelorc commented Dec 19, 2020

As a further check, you can compare the kpathsea versions printed by dvisvgm -V1 and kpsewhich --version. If the versions differ, it's another hint. On my Linux box they are identical:

$ dvisvgm -V1|grep kpathsea
kpathsea:    6.2.2
$ kpsewhich --version|grep kpathsea
kpathsea version 6.2.2

Hello. I have similar problems.

In my case, the versions are different. From kpsewhich --version I got kpathsea version 6.3.2 and from dvisvgm -V1 I got kpathsea: 6.3.1.

Any idea how to help me? I've just installed TeXlive from CTAN today. Also, I updated dvisvgm via apt-get to the 2.8.1 version
Regards.

@kagurazaka-ayano
Copy link

kagurazaka-ayano commented Feb 4, 2024

Does $ kpsewhich tex.pro print the correct path to tex.pro? If yes, dvisvgm should find the file as well, except it's linked to a different kpathsea library with different settings. Do you use the dvisvgm binary that comes with your TeX distribution or did you install another one?

Mine returned nothing and kpsewhich returned 1. I installed mactex via homebrew.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants