类 dinbrief 和包 pdfpages 的组合对我来说无法编译。以下是 MWE(好吧,在这种情况下是最小的非工作示例):
\documentclass[]{dinbrief}
\usepackage[demo]{pdfpages}
\begin{document}
Text here
\includepdf[pages=1]{somePdfFile}
\end{document}
这是在 .tex 文件上运行 pdflatex 后得到的 .log:
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (MiKTeX 23.5) (preloaded format=pdflatex 2023.5.17) 17 MAY 2023 01:40
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**./anschreiben_mimimal.tex
(anschreiben_mimimal.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-05-11>
(C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/dinbrief\dinbrief.cls
Document Class/Style 'dinbrief' - Version 1.73
University of Karlsruhe - 2000/03/02 12:49:21
*** dinbrief: Running in LaTeX 2e mode!
*** dinbrief: NFSS 2!
Document Class: dinbrief 2000/03/02 LaTeX2e class
\ka@db@tmpdima=\dimen140
\ka@db@tmpdimb=\dimen141
\@mainlbl=\write3
\GZA=\dimen142
\ltf@headheight=\dimen143
\lts@headheight=\dimen144
\ltf@headsep=\dimen145
\lts@headsep=\dimen146
\ltf@textheight=\dimen147
\lts@textheight=\dimen148
\ka@db@txtlmarg=\dimen149
\addrhpos=\dimen150
\addrvpos=\dimen151
\addrwd=\dimen152
\addrht=\dimen153
\addroffset=\dimen154
\ka@db@addrhoffs=\dimen155
\backaddrht=\dimen156
\reflinevpos=\dimen157
\ufldmarkvpos=\dimen158
\lfldmarkvpos=\dimen159
\perfmarkvpos=\dimen160
\ka@db@foldmarkhoffs=\dimen161
\ka@db@perfmarkhoffs=\dimen162
\ka@db@foldmarklen=\dimen163
\ka@db@perfmarklen=\dimen164
\bottomtextvpos=\dimen165
\ka@db@headup=\dimen166
\ka@db@vfuzz=\dimen167
\ka@db@stdskip=\dimen168
\ka@db@fieldwd=\dimen169
\ka@db@fldskip=\dimen170
\ka@db@shfldwd=\dimen171
\ka@db@indadr=\dimen172
\dlabelheight=\dimen173
\dlabeltopmargin=\dimen174
\dlabelwidth=\dimen175
\clabelnumber=\count185
\cspare=\count186
\c@lt@state=\count187
\c@letter=\count188
\labelcount=\count189
\c@labelgen=\count190
\yearcnt=\count191
\@betr=\box51
(C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/dinbrief\dinbrief.cfg))
(C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/pdfpages\pdfpages.sty
Package: pdfpages 2022/12/19 v0.5x Insert pages of external PDF documents (AM)
(C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/base\ifthen.sty
Package: ifthen 2022/04/13 v1.1d Standard LaTeX ifthen package (DPC)
)
(C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/tools\calc.sty
Package: calc 2017/05/25 v4.3 Infix arithmetic (KKT,FJ)
\calc@Acount=\count192
\calc@Bcount=\count193
\calc@Adimen=\dimen176
\calc@Bdimen=\dimen177
\calc@Askip=\skip48
\calc@Bskip=\skip49
LaTeX Info: Redefining \setlength on input line 80.
LaTeX Info: Redefining \addtolength on input line 81.
\calc@Ccount=\count194
\calc@Cskip=\skip50
)
(C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/eso-pic\eso-pic.sty
Package: eso-pic 2023/05/03 v3.0c eso-pic (RN)
\ESO@tempdima=\dimen178
\ESO@tempdimb=\dimen179
(C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/graphics\keyval.sty
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks16
)
(C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/xcolor\xcolor.sty
Package: xcolor 2022/06/12 v2.14 LaTeX color extensions (UK)
(C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/graphics-cfg\color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 227.
(C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/graphics-def\pdftex.def
File: pdftex.def 2022/09/22 v1.2b Graphics/color driver for pdftex
) (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/graphics\mathcolor.ltx
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1353.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1357.
Package xcolor Info: Model `RGB' extended on input line 1369.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1371.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1372.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1373.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1374.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1375.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1376.
)) (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graphicx.sty
Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)
(C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graphics.sty
Package: graphics 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR)
(C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/graphics\trig.sty
Package: trig 2021/08/11 v1.11 sin cos tan (DPC)
)
(C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/graphics-cfg\graphics.cf
g
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 107.
)
\Gin@req@height=\dimen180
\Gin@req@width=\dimen181
)
\AM@pagewidth=\dimen182
\AM@pageheight=\dimen183
\AM@fboxrule=\dimen184
(C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/pdfpages\ppnull.def
File: ppnull.def 2022/12/19 v0.5x Pdfpages dummy driver (AM)
Package pdfpages Warning: I will use a dummy \includepdf command
(pdfpages) which will insert empty pages instead of the actual
(pdfpages) PDF file because we are running in `demo' mode.
)
\pdfpages@includegraphics@status=\count195
\AM@pagebox=\box52
\AM@global@opts=\toks17
\AM@pagecnt=\count196
\AM@toc@title=\toks18
\AM@lof@heading=\toks19
\c@AM@survey=\count197
\AM@templatesizebox=\box53
) (anschreiben_mimimal.aux)
\openout1 = `anschreiben_mimimal.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
Package pdfpages Warning: I cannot determine the number of pages of the
(pdfpages) included document, because we are running in
(pdfpages) `demo' mode.
(pdfpages) You can use the option `lastpage' to give me a hint.
! Undefined control sequence.
\set@color ...\@pdfcolorstack push{\current@color
}\aftergroup \reset@color
\@outputpage ...t {\vfil \color@hbox \normalcolor
\hb@xt@ \textwidth {\@theh...
\@opcol ...te@singlecol@structures@@ \@outputpage
\fi \global \@mparbottom \...
<output> ...specialoutput \else \@makecol \@opcol
\@startcolumn \@whilesw \i...
\newpage ...prevdepth \fi \fi \vfil \penalty -\@M
\AM@output@i ...ean {AM@endoflist}{false}\newpage
\whiledo {\not \boolean {A...
\\includepdf ...ndafter {\the \AM@global@opts ,#1}
\fi \AM@CheckAtEnd \endgro...
l.9 \includepdf[pages=1]{somePdfFile}
?
! Undefined control sequence.
\set@color ...\@pdfcolorstack push{\current@color
}\aftergroup \reset@color
\@outputpage ...footskip \color@hbox \normalcolor
\hb@xt@ \textwidth {\@thef...
\@opcol ...te@singlecol@structures@@ \@outputpage
\fi \global \@mparbottom \...
<output> ...specialoutput \else \@makecol \@opcol
\@startcolumn \@whilesw \i...
\newpage ...prevdepth \fi \fi \vfil \penalty -\@M
\AM@output@i ...ean {AM@endoflist}{false}\newpage
\whiledo {\not \boolean {A...
\\includepdf ...ndafter {\the \AM@global@opts ,#1}
\fi \AM@CheckAtEnd \endgro...
l.9 \includepdf[pages=1]{somePdfFile}
?
[1
{C:/Users/username/AppData/Local/MiKTeX/fonts/map/pdftex/pdftex.map}]
! Undefined control sequence.
\set@color ...\@pdfcolorstack push{\current@color
}\aftergroup \reset@color
\@outputpage ...t {\vfil \color@hbox \normalcolor
\hb@xt@ \textwidth {\@theh...
\@opcol ...te@singlecol@structures@@ \@outputpage
\fi \global \@mparbottom \...
<output> ...specialoutput \else \@makecol \@opcol
\@startcolumn \@whilesw \i...
\newpage ...prevdepth \fi \fi \vfil \penalty -\@M
\AM@output@i ...e \@firstcolumnfalse \fi \newpage
\ifthenelse {\boolean {AM@...
\\includepdf ...ndafter {\the \AM@global@opts ,#1}
\fi \AM@CheckAtEnd \endgro...
l.9 \includepdf[pages=1]{somePdfFile}
?
! Undefined control sequence.
\set@color ...\@pdfcolorstack push{\current@color
}\aftergroup \reset@color
\@outputpage ...footskip \color@hbox \normalcolor
\hb@xt@ \textwidth {\@thef...
\@opcol ...te@singlecol@structures@@ \@outputpage
\fi \global \@mparbottom \...
<output> ...specialoutput \else \@makecol \@opcol
\@startcolumn \@whilesw \i...
\newpage ...prevdepth \fi \fi \vfil \penalty -\@M
\AM@output@i ...e \@firstcolumnfalse \fi \newpage
\ifthenelse {\boolean {AM@...
\\includepdf ...ndafter {\the \AM@global@opts ,#1}
\fi \AM@CheckAtEnd \endgro...
l.9 \includepdf[pages=1]{somePdfFile}
?
[2] )
Here is how much of TeX's memory you used:
2239 strings out of 476360
34229 string characters out of 5788497
1850993 words of memory out of 5000000
22688 multiletter control sequences out of 15000+600000
512287 words of font info for 32 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
72i,8n,76p,238b,258s stack positions out of 10000i,1000n,20000p,200000b,200000s
<C:/Users/username/AppData/Local/Programs/MiKTeX/fonts/type1/public/amsfonts/c
m/cmr10.pfb>
Output written on anschreiben_mimimal.pdf (2 pages, 12959 bytes).
PDF statistics:
14 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
我认为这可以直接追溯到软件包。这是在 Windows 上新安装的 Miktex。我在安装了较旧 Miktex 的旧计算机上使用了完全相同的类和包组合,因此可能在此期间出现了不兼容的情况。您知道如何解决这种不兼容问题吗?
答案1
dinbrief
自 2020/10/01 起,它与所有 LaTeX 版本均不兼容。(恕我直言,它之前甚至不完全兼容,但从该 LaTeX 版本开始,它破坏了\begin{document}
LaTeX 的代码,因此经常导致错误。)所以你不应该再使用它了。
解决方法对于旧信件,你仍然需要编译,您可以尝试使用包回滚 LaTeX 版本latexrelease
:
\RequirePackage[2020/03/02]{latexrelease}
\documentclass[]{dinbrief}
\usepackage[demo]{pdfpages}
\begin{document}
Text here
\includepdf[pages=1]{somePdfFile}
\end{document}
但请注意,这并不适用于所有文档,因为其他一些软件包的当前版本依赖于当前的 LaTeX 版本,因此回滚会失败。在这种情况下,您需要付出额外的努力才能使其再次运行。
对于(不仅仅)德语字母,有几种替代方案可以与最新的 LaTeX 版本配合使用,例如,g-brief
,scrlttr2
,scrletter
,akletter
ETC。