在 mac osx 上使用 Latex(特别是 pdflatex)生成时,pdf 文档中的字体搞砸了 [英] Fonts in pdf documents screwed up when generated with latex (specifically, pdflatex) on mac osx

查看:46
本文介绍了在 mac osx 上使用 Latex(特别是 pdflatex)生成时,pdf 文档中的字体搞砸了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的同事建议 texniscope 在某种程度上应该受到指责,我应该尝试从我的系统中清除它.我真的希望不必求助于那个!

可能的线索:

  • 在我升级到 Leopard 之前,这不是问题.

  • 当我说字体被搞砸时,我的意思是正文看起来可能是默认的 mac 系统字体,所有的数学都是完全不可读的.基本上所有特殊符号都是完全乱码的.

  • 我从这里安装了乳胶:http://www.tug.org/mactex/.我已经安装了texniscope.

  • 当我运行 /usr/texbin/pdflatex foo.tex 时,它似乎可以工作:

<上一页>这是 pdfTeXk,版本 3.1415926-1.40.9 (Web2C 7.5.7)%&-line 解析已启用.进入扩展模式...

但是生成的 pdf 文件弄乱了字体.

  • 在命令行上使用 pdflatex 或使用 TeXShop 都会发生同样的事情.

解决方案

Apple 知道这个问题并且不打算修复它(我让一位教员花了很多时间测试并向 Apple 提交了一个错误).他们声称 PDFTeX 错误地嵌入了字体,并且他们已修复 Apple PDF 库,使其对将接受和不接受的内容更加严格,这意味着您将继续在预览中看到使用 PDFTeX 创建的 PDF 文档的问题、TeXShop 或其他使用 Apple 的 PDF 引擎显示 PDF 的工具.不幸的是,他们根本不清楚 PDFTeX 到底做错了什么,这使得修复它甚至向 PDFTeX 开发人员报告错误成为问题.请注意,Adobe 的 Acrobat 或 Reader 应用程序通常可以毫无问题地显示这些文档;大概 Adob​​e 的错误检查比 Apple 的更自由.

您实际上可以在不重新启动的情况下从这个问题中恢复,尽管您可能会看到它在同一个会话中与同一个文档重复出现.你需要运行

atutil server -shutdown

这将杀死 Apple 类型服务服务器守护进程 (ATSServer) 并生成一个新实例,巧合地重建其缓存文件.

My colleague suggests that texniscope is somehow to blame and that I should try purging it from my system. I really hope not to have to resort to that!

Possible clues:

  • This wasn't an issue till I upgraded to Leopard.

  • When I say the fonts are screwed up, I mean the main text looks like maybe it's the default mac system font, and all math is completely unreadable. Basically all special symbols are completely garbled.

  • I installed latex from here: http://www.tug.org/mactex/. I had already had texniscope installed.

  • When I run /usr/texbin/pdflatex foo.tex, it seems to work:

     This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)
     %&-line parsing enabled.
     entering extended mode
    ...

but the resulting pdf file has screwed up fonts.

  • The same thing happens both with pdflatex on the command line, or using TeXShop.

解决方案

Apple knows about the problem and isn't planning to fix it (I had a faculty member spend a lot of time testing and submit a bug to Apple). Their claim is that PDFTeX is embedding the fonts incorrectly, and they have fixed the Apple PDF library to be more strict about what it will and won't accept, which means that you will continue to see problems with PDF documents created with PDFTeX in Preview, TeXShop, or other tools that display PDF using Apple's PDF engine. Unfortunately, they weren't at all clear about exactly what it is that PDFTeX is doing wrong, which makes fixing it or even reporting the bug to the PDFTeX developers problematic. Note that Adobe's Acrobat or Reader applications can often display these documents without any problems; presumably Adobe's error-checking is more liberal than Apple's.

You can actually recover from this problem without rebooting, although you may see it recur with the same document in the same session. You need to run

atsutil server -shutdown

which will kill the Apple Type Services server daemon (ATSServer) and spawn a new instance, coincidentally rebuilding its cache files.

这篇关于在 mac osx 上使用 Latex(特别是 pdflatex)生成时,pdf 文档中的字体搞砸了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆