Friday, July 8, 2011

ThuThesis的LaTeX模板的UCS2/UCS4错误临时解决方案

11.08.17:这个问题已经完美解决,不需要这个临时方案了,参见:
http://tonysh-thu.blogspot.com/2011/08/ctexucs2ucs4.html

在Windows XP英文版,CTeX中文套装2.9的环境下,使用ThuThesis的LaTeX毕业论文模板4.5.1版本,有时候在应用dvipdfmx命令时会出现错误:
Failed to read UCS2/UCS4 TrueType cmap...
诡异的是,这个错误最开始不会出现而正常生成pdf文档,在毫无先兆的情况下会突然出现,之后就没有办法修复了。
已经确认过的事情是在Win7,其他同样的条件下工作正常。

造成这个错误的表面原因似乎是和字体有关。具体原因是在生成封面相关信息时(\makecover in main.tex),封面的作者/单位/导师等信息的那部分代码错误。这些代码在thuthesis.cls中:
              \thu@put@title{\thu@cdepartmenttitle}  & \thu@title@sep & {\ziju{3bp}\thu@cdepartment} \\
              \thu@put@title{\thu@cmajortitle}       & \thu@title@sep & {\ziju{3bp}\thu@cmajor}\\
              \thu@put@title{\thu@cauthortitle}      & \thu@title@sep & {\ziju{11bp}\thu@cauthor}\\
              \thu@put@title{\thu@csupervisortitle}  & \thu@title@sep & {\ziju{11bp}\thu@csupervisor}\\
              \ifx\thu@cassosupervisor\@empty\else
                \thu@put@title{\thu@cassosupertitle} & \thu@title@sep & {\ziju{11bp}\thu@cassosupervisor}\\
              \fi
              \ifx\thu@ccosupervisor\@empty\else
                \thu@put@title{\thu@ccosupertitle}   & \thu@title@sep & {\ziju{11bp}\thu@ccosupervisor}\\
              \fi
具体是什么原因我并不清楚,但一个临时的解决方案是注释掉这些代码,就可以正常编译,只是没有作者信息了。或更简单的注释掉\makecover就行了,这样整个封面还有摘要什么的就全都没有了。

No comments:

Post a Comment