Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 201258 - app-text/dvipdfmx-20071115 need CMap files to work properly
Summary: app-text/dvipdfmx-20071115 need CMap files to work properly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: TeX project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-04 19:57 UTC by Jie Luo
Modified: 2007-12-06 08:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The example tex file (test.tex,129 bytes, text/plain)
2007-12-05 23:53 UTC, Jie Luo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jie Luo 2007-12-04 19:57:24 UTC
dvipdfmx need CMap files to make the text exacting of PDF work correctly for CJK language. In previous version of dvipdfmx ebuild, this is done by link the Resource file of ghostscript to texmf/font/cmap/ghostscript. There are several sources of CMap files in the portage, ghostscript, poppler-data, xpdf and acroread. CMap files in acroread are only allowed to use inside, so it is not the right source of CMap files for dvipdfmx. ghostscript and xpdf are to heavy to depend on. A better solution is the poppler-data, it only contains CMap files. 

So what we need to do is add poppler-data as runtime dependent, and link /usr/share/poppler/cMap to /usr/share/texmf/fonts/cmap/cMap.

And another suggestion to app-text/dvipdfm(x) is that move the real config file to /etc/texmf, and make a symbol link to /usr/share/texmf as other package does.
For example, install dvipdfmx.cfg to /etc/texmf/dvipdfm and link it to /usr/share/texmf/dvipdfm/dvipdfmx.cfg. This will make the configuration of these two package much easier. Otherwise as their config file are not being protected, you have to reconfig every time you update.

Reproducible: Always

Steps to Reproduce:
1. dvipdfmx file.dvi (contain Chinese GBK char)
2. 
Actual Results:  
file.dvi -> file.pdf
[1
** ERROR ** Could not find encoding file "UniGB-UCS2-H".

Output file removed.
Comment 1 Alexis Ballier gentoo-dev 2007-12-05 13:25:13 UTC
thanks all those suggestions are very good, I'll make a -r1 incorporating them.

However, do you have sample dvi/tex files that trigger the cmap problem ? with all what I've tried, I couldnt get this failure :/
Comment 2 Jie Luo 2007-12-05 23:52:40 UTC
In order to reproduce this problem, you need first install texlive-langcjk and cjk-latex. This can be done by USE="cjk" emerge texlive. You need to install media-fonts/arphicfonts for truetype fonts. Add the following line to cid-x.map file.

gbsnlp@EUC@   GB-EUC-H   gbsn00lp

Then you can use the test.tex in the attachment to produce test.dvi. This problem can be produced by `dvipdfmx test.dvi.'

test.dvi -> test.pdf
[1
** ERROR ** Could not find encoding file "GB-EUC-H".

Output file removed.
Comment 3 Jie Luo 2007-12-05 23:53:53 UTC
Created attachment 137853 [details]
The example tex file
Comment 4 Jie Luo 2007-12-05 23:56:27 UTC
(In reply to comment #2)
> In order to reproduce this problem, you need first install texlive-langcjk and
> cjk-latex. This can be done by USE="cjk" emerge texlive. You need to install
> media-fonts/arphicfonts for truetype fonts. Add the following line to cid-x.map
> file.

If you install arphicfonts after you install texlive, I think you'd better update the ls-R by mktexlsr.

> 
> gbsnlp@EUC@   GB-EUC-H   gbsn00lp
> 
> Then you can use the test.tex in the attachment to produce test.dvi. This
> problem can be produced by `dvipdfmx test.dvi.'
> 
> test.dvi -> test.pdf
> [1
> ** ERROR ** Could not find encoding file "GB-EUC-H".
> 
> Output file removed.
> 

Comment 5 Alexis Ballier gentoo-dev 2007-12-06 08:04:59 UTC
should be fixed in -r1

thanks a lot for your help ! please continue to suggest such improvements for tex stuff because unfortunately my asian language knowledge is very limited or inexistant.