我需要制作一份 PDF/A 文档pdfx
,它似乎pdflatex
在我的文档上崩溃了。我花了很长时间才找出问题所在,并制作了一个最小(不)工作的示例:
\documentclass{article}
\usepackage[a-1b]{pdfx}
\usepackage{pigpen}
\begin{document}
{\pigpenfont A}
\end{document}
以下是输出pdflatex
...
Package hyperref Message: Driver: hpdftex.
(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/hpdftex.def
(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/puenc.def)
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/inputenc.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/pdfx/8bit.def)
**pdfx: No file test.xmpdata . Metadata will be incomplete!
<<sRGB_IEC61966-2-1_black_scaled.icc>>
(/usr/local/texlive/2015/texmf-dist/tex/latex/pdfx/8bit.def)
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/utf8.def
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/t1enc.dfu)
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/ot1enc.dfu)
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/omsenc.dfu))
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/utf8.def
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/t1enc.dfu)
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/ot1enc.dfu)
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/omsenc.dfu))
(/usr/local/texlive/2015/texmf-dist/tex/generic/pdftex/glyphtounicode.tex)
(/usr/local/texlive/2015/texmf-dist/tex/latex/pdfx/glyphtounicode-cmr.tex)
(/usr/local/texlive/2015/texmf-dist/tex/latex/xmpincl/xmpincl.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/ifthen.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/pdfx/8bit.def)
Using XMP template file: pdfa.xmp
<<pdfa.xmpi>>) (/usr/local/texlive/2015/texmf-dist/tex/latex/pigpen/pigpen.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/pigpen/pigpen.tex)) (./test.aux)
(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./test.out) (./test.out) [1] (./test.aux) )</usr/local/texlive/2015/texmf-dist
/fonts/type1/public/amsfonts/cm/cmr10.pfb><</usr/local/texlive/2015/texmf-dist/
fonts/type1/public/pigpen/pigpen.pfa>>Assertion failed: (fo->fd->builtin_glyph_names != NULL), function write_fontdictionary, file ../../../texk/web2c/pdftexdir/writefont.c, line 539.
Abort trap: 6
我需要pigpen
仅适用于符号“┘”(我在一些交换图中使用它)。有什么解决方法吗?
非常感谢。
更新。\large$\lrcorner$
有点像{\pigpenfont A}
,但希望有人能向我解释发生了什么事pdfx
......
答案1
对于单个字符,你可以使用picture
:
\documentclass{article}
%\usepackage[a-1b]{pdfx}
\usepackage{pigpen}
\usepackage{pict2e}
\DeclareRobustCommand{\pigpenA}{%
\begingroup\setlength{\unitlength}{1em}%
\linethickness{.075em}%
\begin{picture}(1,.8)
\roundcap\roundjoin
\polyline(.2,.2)(.8,.2)(.8,.8)
\end{picture}%
\endgroup
}
\begin{document}
X{\pigpenfont A}X
X\quad X
X\pigpenA X
\end{document}
并且它适用于pdfx
:
\documentclass{article}
\usepackage[a-1b]{pdfx}
\usepackage{pict2e}
\DeclareRobustCommand{\pigpenA}{%
\begingroup\setlength{\unitlength}{1em}%
\linethickness{.075em}%
\begin{picture}(1,.8)
\roundcap\roundjoin
\polyline(.2,.2)(.8,.2)(.8,.8)
\end{picture}%
\endgroup
}
\begin{document}
X\pigpenA X
\end{document}
显然,该字体使用了 PDF/X 格式不允许的调用。