sage-on-gentoo icon indicating copy to clipboard operation
sage-on-gentoo copied to clipboard

missing map file "ckx.map"

Open strogdon opened this issue 3 years ago • 15 comments

First noticed this installing vanilla but it's also present on s-o-g. It may be of no consequence since it is not fatal.

From the build folder /var/tmp/portage/sci-mathematics/sage-doc-9999/work/build_doc/latex/ja/tutorial

# dvipdfmx -o tutorial-jp.pdf tutorial-jp.dvi

dvipdfmx:warning: Couldn't open font map file "ckx.map".
tutorial-jp.dvi -> tutorial-jp.pdf
[1
dvipdfmx:warning: Failed to load ToUnicode mapping: UTF8-UCS2
dvipdfmx:warning: Interpreting special command tounicode (pdf:) failed.
dvipdfmx:warning: >> at page="1" position="(72, 720)" (in PDF)
dvipdfmx:warning: >> xxx "pdf:tounicode UTF8-UCS2"
][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23][24][25][26][27][28][29][30][31][32][33][34][35][36][37][38][39][40][41][42][43][44][45][46][47][48][49][50][51][52][53][54][55][56][57][58][59][60][61][62][63][64][65][66][67][68][69][70][71][72][73][74][75][76][77][78][79][80][81][82][83][84][85][86][87][88][89][90][91][92][93][94][95][96][97][98][99][100][101][102][103][104][105][106][107][108][109][110][111][112][113][114][115][116][117][118][119][120][121][122][123][124][125][126][127][128][129]
702214 bytes written

ckx.map appears in /etc/texmf/dvipdfmx.d/dvipdfmx.cfg:226:f ckx.map but I cannot find the file anywhere. Some distros do include the file but I'm unable to determine its contents.

strogdon avatar Jun 13 '22 04:06 strogdon

Blast from the past https://trac.sagemath.org/ticket/22252 we are commenting about this very file in there.

kiwifb avatar Jun 13 '22 04:06 kiwifb

I had noticed that when "googling". Latest on Gentoo is texlive-2021. There is a 2022. Perhaps a correction is available with the newer texlive.

strogdon avatar Jun 13 '22 04:06 strogdon

I am dubious, some of these map files have a long history of disappearing. Of course it may just need a tweak in the installation procedure for all I know. I am a bit concerned that I cannot find what looks like a source for it from simple googling, which tells me it may be generated.

kiwifb avatar Jun 13 '22 04:06 kiwifb

Interestingly it is in the arch linux package https://archlinux.org/packages/extra/any/texlive-core/files/ so yes, may be going to 2022 will improve things. If not, digging for where it originates would be a job.

kiwifb avatar Jun 13 '22 04:06 kiwifb

If I comment out f ckx.map in dvipdfmx.cfg there is

# dvipdfmx -o tutorial-jp.pdf tutorial-jp.dvi
tutorial-jp.dvi -> tutorial-jp.pdf
[1
dvipdfmx:warning: Failed to load ToUnicode mapping: UTF8-UCS2
dvipdfmx:warning: Interpreting special command tounicode (pdf:) failed.
dvipdfmx:warning: >> at page="1" position="(72, 720)" (in PDF)
dvipdfmx:warning: >> xxx "pdf:tounicode UTF8-UCS2"

No reference to the file. So maybe something deeper.

strogdon avatar Jun 13 '22 04:06 strogdon

Since I don't do Japanese I have no idea if the rendered characters are correct.

strogdon avatar Jun 13 '22 04:06 strogdon

While I know some japanese, I am not sure I could figure if everything is correct.

kiwifb avatar Jun 13 '22 04:06 kiwifb

See https://oku.edu.mie-u.ac.jp/~okumura/texfaq/qa/52108.html for possible differences.

strogdon avatar Jun 13 '22 04:06 strogdon

The above is for EUC-UCS2 and not for UTF8-UCS2.

strogdon avatar Jun 13 '22 04:06 strogdon

I am not sure what to do with it but it all looks legit to me - a mix of Kanji (chinese characters) and hiragana and curiously no katakana (the last two being purely japanese character sets similar to upper and lower case in design but not in usage).

kiwifb avatar Jun 13 '22 04:06 kiwifb

I believe this is what is not being processed properly

sphinxoptionshyperref.sty:    \AtBeginShipoutFirst{\special{pdf:tounicode UTF8-UCS2}}

strogdon avatar Jun 13 '22 05:06 strogdon

We are now getting into sphinx - yuck. It looks like a lot of badly documented stuff.

kiwifb avatar Jun 13 '22 08:06 kiwifb

From what I can find UCS2 is obsolete, although it is mentioned in the current dvipdfmx CTAN documentation. It may just be that sphinxoptionshyperref.sty should be modified to use something other than UTF8-UCS2. For example if I change UCS2 to UTF16 (a close cousin of UCS2) the warning goes away. This is probably nothing to worry about.

strogdon avatar Jun 14 '22 05:06 strogdon

For reference, there are some fonts in tutorial-jp.pdf for which there is no explicit ToUnicode map in the PDF file

name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
RQLDDN+TeXGyreHeros-Bold             Type 1C           Custom           yes yes yes      4  0
MRIMFW+HaranoAjiGothic-Medium-Identity-H CID Type 0C       Identity-H       yes yes no       5  0
QGMOGC+TeXGyreHeros-BoldItalic       Type 1C           Custom           yes yes yes      7  0
OXGXUO+TeXGyreTermes-Regular         Type 1C           Custom           yes yes yes     15  0
NIUASB+TeXGyreTermes-Bold            Type 1C           Custom           yes yes yes     16  0
ULCDQB+HaranoAjiMincho-Regular-Identity-H CID Type 0C       Identity-H       yes yes no      18  0
GGYCEQ+CMMI10                        Type 1C           Builtin          yes yes yes     21  0
XWSANK+t1xtt                         Type 1C           Builtin          yes yes no      92  0
ENAOKT+t1xbtt                        Type 1C           Builtin          yes yes yes    101  0
JRNHNA+TeXGyreTermes-Regular         Type 1C           Custom           yes yes yes    112  0
VUFNBZ+CMSY10                        Type 1C           Builtin          yes yes yes    113  0
VEGDEZ+TeXGyreTermes-Italic          Type 1C           Custom           yes yes yes    117  0
QNBHZI+tcxtt                         Type 1C           Builtin          yes yes no     134  0
NWZIPW+CMR10                         Type 1C           Builtin          yes yes yes    160  0
ZRFZGW+CMR7                          Type 1C           Builtin          yes yes yes    161  0
QKTGBS+CMEX10                        Type 1C           Builtin          yes yes yes    165  0
QFARXB+CMMI7                         Type 1C           Builtin          yes yes yes    166  0
TVOBSE+CMR5                          Type 1C           Builtin          yes yes yes    167  0
LOZXWM+CMSY7                         Type 1C           Builtin          yes yes no     168  0
NMPFRV+CMMI5                         Type 1C           Builtin          yes yes no     173  0
NDRZSX+CMSY5                         Type 1C           Builtin          yes yes yes    174  0
FORGAN+NimbusRomNo9L-Regu            Type 1C           Custom           yes yes yes    217  0
NQBPKO+CMBX10                        Type 1C           Builtin          yes yes yes    239  0
OSAFKY+CMMI12                        Type 1C           Builtin          yes yes yes    298  0

strogdon avatar Jun 14 '22 05:06 strogdon

From what I can find UCS2 is obsolete, although it is mentioned in the current dvipdfmx CTAN documentation. It may just be that sphinxoptionshyperref.sty should be modified to use something other than UTF8-UCS2. For example if I change UCS2 to UTF16 (a close cousin of UCS2) the warning goes away. This is probably nothing to worry about.

Yes, that was the kind of things I found out as well. The style sheet belongs to sphinx, so that could be an issue to raise with them.

kiwifb avatar Jun 14 '22 06:06 kiwifb