我需要将我的论文编译为符合 PDF/A 标准的文档。因此我使用pdfx 包。最近(由于有很多 tikz 图形)我已经从 pdflatex 更改为路拉泰克斯(TeX 内存 - 外部化不是一个选项,因为我的图中有首字母缩略词和引文的链接)。Lualatex 编译了完整的 pdf,但引发了错误:
(c:/texlive/2022/texmf-dist/tex/latex/pdfx/pdfx.sty 软件包:pdfx 2019/02/27 v1.6.3 PDF/X 和 PDF/A 支持(CVR/HTH/RRM/PS)\pdfx@minorversion=\count440
!缺失数字,视为零。\scan_stop:l.332 这里应该是一个数字;我插入了“0”。(如果您不明白我为什么需要看到一个数字,请在 TeXbook 索引中查找“奇怪的错误”。)
TeX live 的最新版本尚未修复此问题。这是一个错误还是输入错误,我可以解决吗?我很乐意提供任何帮助。谢谢!
我的 MWE 看起来像这样:
\documentclass[%
a4paper,
11pt,
BCOR=10mm, DIV=14, headinclude, headheight=16mm, twoside, openright, onecolumn,
parskip=half,
]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\definecolor{darkblue}{rgb}{0.0,0.0,0.4}
\definecolor{darkgreen}{rgb}{0.0,0.5,0.0}
\definecolor{myOrange}{rgb}{1,0.5,0.055}
\definecolor{myBlue}{rgb}{0.1,0.5,0.7}
\usepackage[T1]{fontenc}
\usepackage{helvet,mathpazo}
\usepackage{microtype}
\usepackage[ngerman,english]{babel}
\usepackage[absolute]{textpos}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
% ###--- Own Page Style ---###
\usepackage[headsepline]{scrlayer-scrpage}
\clearpairofpagestyles
\pagestyle{scrheadings}
\ohead{\pagemark}
\ihead{\headmark}
\automark[section]{chapter}
\ofoot[\pagemark]{} %to set pagenumber in footer on first pages of chapters
% ###--- Page Style END ---###
\usepackage{scrhack} %to delete warning <\float@addtolists detected!>
\usepackage[onehalfspacing]{setspace}
\usepackage{graphicx,wrapfig}
\usepackage{overpic}
\usepackage{float} %[H]
\usepackage{enumitem} %This package provides user control over the layout of the three basic list environments: enumerate, itemize and description.
\usepackage{subfiles}
\usepackage[
bookmarksnumbered=true,
pdfborder={0 0 0},
breaklinks=true,
colorlinks=true,
linkcolor=black,
urlcolor=darkblue,
filecolor=black,
citecolor=black,
linktoc=all,
pdfstartview=Fit, %fit to full page
pdfpagelayout=TwoPageLeft %display pdf in two page view (book)
]{hyperref}
%TODO: check if with texlive 2022 solved?
\usepackage[a-1b]{pdfx} %error with lualatex!!!
\setcounter{secnumdepth}{3}
\tolerance=300
\clubpenalty=10000
\widowpenalty=10000
\displaywidowpenalty=10000
\addtokomafont{caption}{\small}
\setkomafont{captionlabel}{\small\sffamily\bfseries}
\setlength\parindent{0pt}
%
%%
%%%%
\begin{document}
%%%%%%%%%%%%%%%%
Title page
%%%%%%%%%%%%
\frontmatter
Intro
\tableofcontents
%%%%%%%%%%%
\mainmatter
Main text.
%%%%%%%%%
\appendix
Appendix
\end{document}
答案1
@DavidCarlisle 建议的解决方法按描述的方式工作。
添加行\usepackage{luatex85}
前 \usepackage[a-1b]{pdfx}
使用 lualatex 消除了编译错误。