如何将“目录”包与 g-brief2 类结合起来?

如何将“目录”包与 g-brief2 类结合起来?

我正在努力将目录包与g-brief2类结合起来。任何帮助都将不胜感激。

我使用 中的目录包构建了一个可运行的最小示例article,它对我来说运行良好(所有文件都可以从 下载这里

\documentclass[10pt]{article}

\usepackage[break,longdates]{directory} 
    \directorystyle{address}
    \pagestyle{headings}

\begin{document}
    \title{\texttt{directory}: Address Book}
    \author{\dir{c.geuzaine}}
    \maketitle
    \nodir{*}
    \directory{family} 
\end{document}

我的当前g-brief2代码如下所示:

\documentclass[12pt,english]{g-brief2}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{pdfpages}
\usepackage[break,longdates]{directory} 
    \directorystyle{address}    

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Einstellungen für den Brief

\unserzeichen
%\trennlinien
\lochermarke
\faltmarken
\fenstermarken

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Angaben zum Absender

\RetourAdresse{xxx -- xxx -- xxx}

\Name               {xxx}
\AdressZeileA       {xxx}
\AdressZeileB       {xxx}
\AdressZeileC       {}
\AdressZeileD       {}
\AdressZeileE       {}
\AdressZeileF       {}

\TelefonZeileA      {xxx}
\TelefonZeileB      {xxx}
\TelefonZeileC      {}
\TelefonZeileD      {}
\TelefonZeileE      {}
\TelefonZeileF      {}

\InternetZeileA     {xxx}
\InternetZeileB     {xxx}
\InternetZeileC     {}
\InternetZeileD     {}
\InternetZeileE     {}
\InternetZeileF     {}

\BankZeileA     {}
\BankZeileB     {}
\BankZeileC     {}
\BankZeileD     {}
\BankZeileE     {}
\BankZeileF     {}

\Unterschrift       {xxx}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Angaben zum Empfänger

\Postvermerk    {}                   % Einschreiben, etc.
\Adresse        {\dir{microknud}}
\Betreff        {xxx}
\Datum          {xxx}
\Anrede         {xxx}
\Gruss          {Yours sincerely}{1cm}  % Absatz zwischen Brieftext und Grussformel

\Anlagen        {\vspace{1.5cm}
            \underline{xxx}\\ \\
            xxx\\
            xxx\\
            }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Directory Adjustment            
\pagestyle{headings}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Der Brief

\begin{document}
\begin{g-brief}

\title{\texttt{directory}: address books with \LaTeX}
%\maketitle
\author{\dir{microknud}}

% CUSTOM: try e.g. citing just some of the entries
\nodir{*}

% CUSTOM: this has the same effect as \directory[bbl]{family,business}
\directory{family,business} 

%%tth: \par directory generated with \href{directory-address.html}{address-html.bst},
%%tth: \href{directory-email.html}{email-html.bst}, 
%%tth: \href{directory-address.vcf}{address-vcard.bst} and
%%tth: \href{directory-address.ldif}{address-ldif.bst}.




    Text...
    %   \nodir{*}
    %   \directory[german]{addresses}
    %   \directorystyle{letter}

\end{g-brief}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}

出现以下错误:

! Undefined control sequence.
\@oddhead ...\headtoname {} \ignorespaces \toname 
                                                  \hfil \@date \hfil \pagena...
l.105 \end{document}

尽管我现在可以编译文件,但结果并不令人满意。在信件的地址框中,g-brief2我只得到一个“?”,表示\begin{document}目录包之前不能使用?此外,尽管我在文件中包含了一个 no directory print 命令,但信件文本中还是打印了完整的目录:\nodir{*}

我仍在尝试解决这些问题。欢迎提出任何想法和意见!

相关内容