乳胶是写文件的好语言。与
hyperref
包装及
pdflatex
,您可以使用元数据轻松生成文档,这是一个很好的功能,可以在Web上正确引用您的文档。
我经常使用如下模板:
\documentclass[11pt]{article}
\usepackage[pdftex, pdfusetitle,colorlinks=false,pdfborder={0 0 0}]{hyperref}%
\hypersetup{%
pdftitle={My title},%
pdfauthor={My name},%
pdfkeywords={my first keyword, my second keyword, more keywords.},%
}%
\begin{document}
\title{My title}
\author{My name}
\date{}
\maketitle
{\bf Keywords:} my first keyword, my second keyword, more keywords.%
My text is here...
\end{document}
到目前为止,一切都很好。我的问题从示例中突然出现:是否有方法在头中定义字符串变量,以便它们可以作为参数传递给
超级参考文献
然后到前台或文本。类似于:
\documentclass[11pt]{article}
%-------definitions-----
\def\Author{My name}
\def\Title{My title}
\def\Keywords{my first keyword, my second keyword, more keywords.}
%--------------------------
\usepackage[pdftex, pdfusetitle,colorlinks=false,pdfborder={0 0 0}]{hyperref}%
\hypersetup{%
pdftitle={\Title},%
pdfauthor={\Author},%
pdfkeywords={\Keywords},%
}%
\begin{document}
\title{\Title}
\author{\Author}
\date{}
\maketitle
{\bf Keywords:} \Keywords %
My text is here...
\end{document}
这对于
\maketitle
部分和部分
超级参考文献
元数据
! Use of \Title doesn't match ! Argument of \let has an extra }.
但也包括关键字。