使用 microtype 包或零边距时 PDF 裁剪错误

使用 microtype 包或零边距时 PDF 裁剪错误

[更新]请阅读文章底部的内容[更新]

我仍在使用 TexLive 2010(ubuntu),并且我需要创建一些紧密的 pdf(使用pdflatexpdfcrop带有--hires选项)。

我需要使用microtype,并且还需要无边距工​​作(我想创建一些文本条)。问题是结果 pdf 是错误的,从屏幕截图中可以看到,剪切了一些文本。

在某些情况下,删除microtype, 效果很好。在其他情况下,我还需要向 lmargin 添加一些 mm

这是我的geometry设置:

\usepackage[paperwidth=100mm, paperheight=8.5372222276mm, %
marginparsep=0mm, marginparwidth=0mm, columnsep=0mm,tmargin=0mm,bmargin=0mm,lmargin=0mm,rmargin=0mm,headheight=0mm,headsep=0mm,footskip=0mm]{geometry}

完整代码

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{microtype}
\usepackage[paperwidth=100mm, paperheight=8.5372222276mm, %
marginparsep=0mm, marginparwidth=0mm, columnsep=0mm,tmargin=0mm,bmargin=0mm,lmargin=0mm,rmargin=0mm,headheight=0mm,headsep=0mm,footskip=0mm]{geometry}
\pagestyle{empty}
\setlength{\parindent}{0mm}\setlength{\lineskiplimit}{0pt}\setlength{\lineskip}{0pt}
\begin{document}\frenchspacing
\fontfamily{psb}
\fontsize{20bp}{22}
\selectfont
\textit{``xp}
\end{document}

[更新]请阅读文章底部的内容[更新]

使用 mirotype:

With microtype

无缩微型:

Without microtype

我该如何修复它?

[更新]

我做了一些测试。请告诉我这个解决方案在理论上是否正确:例如,我需要 100mm(宽度)x 10mm(高度),因此我在每个边距中添加了 0.49cm(4.9mm)作为边距(使用常见的文字处理器边距作为模型)。

\usepackage[paperwidth=109.8mm, paperheight=19.8mm, textwidth=100mm,textheight=10mm]{geometry} 

然后我用 pdflatex 编译它并使用 --hires (pdfcrop) 裁剪。这是一个好的、干净的解决方案吗?谢谢

答案1

以下是我编译后得到的结果

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\pagestyle{empty}
\begin{document}\frenchspacing
\fontfamily{ptm}
\fontsize{20bp}{22}
\selectfont
\textit{``xp}
\end{document}

并处理结果pdfcrop --hires(我后来添加了一个框架,只是为了在白色背景上显示结果)。我使用了 Times,因为我没有 Sabon,但这不是重点。Ulrike 在她的评论中提到,角色可能有一些部分超出了边界框,例如引号就是这种情况。

enter image description here

以下是编译 Flavio 的示例并执行的操作pdfcrop --hires

enter image description here

应该清楚正确的程序是什么。

相关内容