下面的代码不起作用,因为它没有打印所有地址字段。顺便说一句,我在处理法语字符时遇到了问题,因此我使用了 babel。
你能告诉我出了什么问题吗?
感谢您的帮助。
% COMPILATION
% bibtex pour générer le fichier bbl, puis ensuite pdflatex pour générer le PDF
%
\begin{filecontents*}{\jobname.bib}
@person{pge,
name = "my name",
birthyear = "my birthday",
p.street = "my adress field",
p.city = "my city field",
p.zip "my city zip",
p.state = "my state",
p.country = "my country",
p.phone = "## ## ## ## ##",
p.cellular = "## ## ## ## ##",
p.email = "[email protected]",
}
\end{filecontents*}
\documentclass[a4paper,11pt]{article}
\usepackage[french]{babel}
\usepackage[french,longdates,break]{directory}
%\pagestyle{headings}
% \renewcommand{\Dirheader}[1]
% {\newpage\markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}
%\renewcommand{\Dirheader}[1]
% {\item\hspace{-\dirindent}\textbf{\MakeUppercase{#1}}}
% CUSTOM: here is how I customize the directory for this user's guide:
\renewcommand{\dirsymbol}{\raisebox{1ex}{\tiny{[see \S\ref{sec:output}]}}}
\renewcommand{\Dirlabel}[1]{{#1}}
\renewcommand{\Dirheader}[1]{\item\hspace{-\dirindent}\textbf{\MakeUppercase{#1}}}
\ifx\pdfoutput\undefined\else
\usepackage{hyperref}
\newcommand\MyURL{\begingroup\Url}
\renewcommand{\Diremail}[1]{\href{mailto:#1}{\MyURL{#1}}}
\renewcommand{\Dirurl}[1]{\href{#1}{\MyURL{#1}}}
\fi
\def\baselinestretch{0.98}
\pagestyle{headings}
\begin{document}
\title{Annuaire de la famille}
\author{\dir{pge}}
\date{Version 1.00, 03 septembre 2015}
\maketitle
\nodir{*}
\directorystyle{address}
\directory{\jobname}
\end{document}
答案1
你=
缺少
p.zip ="my city zip",
和
@person{pge,
name = "my name",
birthyear = "my birthday",
p.street = "my adress field",
p.city = "my city field",
p.zip = "my city zip",
p.state = "my state",
p.country = "my country",
p.phone = "12345678",
p.cellular = "12345678",
p.email = "[email protected]",
}
地址将按需要打印。另请记住,您不能#
自由地在 TeX 中使用(我假设您只将它用于此 MWE)。
% COMPILATION
% bibtex pour générer le fichier bbl, puis ensuite pdflatex pour générer le PDF
%
\begin{filecontents*}{\jobname.bib}
@person{pge,
name = "my name",
birthyear = "my birthday",
p.street = "my adress field",
p.city = "my city field",
p.zip = "my city zip",
p.state = "my state",
p.country = "my country",
p.phone = "12345678",
p.cellular = "12345678",
p.email = "[email protected]",
}
\end{filecontents*}
\documentclass[a4paper,11pt]{article}
\usepackage[french]{babel}
\usepackage[french,longdates,break]{directory}
%\pagestyle{headings}
% \renewcommand{\Dirheader}[1]
% {\newpage\markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}
%\renewcommand{\Dirheader}[1]
% {\item\hspace{-\dirindent}\textbf{\MakeUppercase{#1}}}
% CUSTOM: here is how I customize the directory for this user's guide:
\renewcommand{\dirsymbol}{\raisebox{1ex}{\tiny{[see \S\ref{sec:output}]}}}
\renewcommand{\Dirlabel}[1]{{#1}}
\renewcommand{\Dirheader}[1]{\item\hspace{-\dirindent}\textbf{\MakeUppercase{#1}}}
\ifx\pdfoutput\undefined\else
\usepackage{hyperref}
\newcommand\MyURL{\begingroup\Url}
\renewcommand{\Diremail}[1]{\href{mailto:#1}{\MyURL{#1}}}
\renewcommand{\Dirurl}[1]{\href{#1}{\MyURL{#1}}}
\fi
\def\baselinestretch{0.98}
\pagestyle{headings}
\begin{document}
\title{Annuaire de la famille}
\author{\dir{pge}}
\date{Version 1.00, 03 septembre 2015}
\maketitle
\nodir{*}
\directorystyle{address}
\directory{\jobname}
\end{document}
pdflatex
然后运行bibtex
并pdflatex
在pdflatex
此文件上获取
答案2
非常感谢 !
我对 \directorystyle{ 还有一个小问题地址-html} 样式。Latex 编译打印错误消息,并且不构建任何 .html 输出,而只构建带有 html 内容的 ..bbl...这是使用 latex 编译时的错误信息,地址-html:
File `ANNUAIRE@PGE_Famille.bib' already exists on the system.
Directory citation `pge' on page 1 undefined on input line 57.
Misplaced alignment tab character & <dd> <dt>&
Misplaced alignment tab character & <dd> <dt> &
Misplaced alignment tab character & <dd> <dt> &
Misplaced alignment tab character & <dd> <dt> &
Misplaced alignment tab character & <dd> <dt>&
Misplaced alignment tab character & <dd> <dt> &
Misplaced alignment tab character & <dd> <dt> &
Misplaced alignment tab character & <dd> <dt> &
Misplaced alignment tab character & <dd> <dt>&
Misplaced alignment tab character & <dd> <dt> &
Misplaced alignment tab character & <dd> <dt> &
Misplaced alignment tab character & <dd> <dt> &
Overfull \hbox (187.00826pt too wide) in paragraph
Overfull \hbox (6.40639pt too wide) in paragraph
Overfull \hbox (82.70085pt too wide) in paragraph
Overfull \hbox (96.05931pt too wide) in paragraph
Overfull \hbox (55.51524pt too wide) in paragraph
Underfull \hbox (badness 10000) in paragraph
There were undefined references.
顺便说一句,我不明白您所说的“地址将按需要打印。另外请记住,您不能在 TeX 中自由使用 #(我假设您只将它用于这个 MWE)。”是什么意思?