如何引用bibitem的文本?

如何引用bibitem的文本?

我很难输入引用的全文。我已将参考书目添加到文档中:

\begin{document}
...
\begin{thebibliography}{99}
\bibitem{stern} 
Frederick Stern, Conditional expectation of the duration in the classical ruin problem, Math. Mag. 48 (4) (1975) 200-203
.....
\end{thebibliography}
\end{document}

是否可以引用文本而不提及数字?

例如我想在文档中插入bibitem{stern}的所有信息:

我们提出了一种统一的方法,使用生成函数来证明和扩展在 [Frederick Stern,古典破产问题中持续时间的条件期望,Math. Mag. 48 (4) (1975) 200-203] 中获得的一些结果

\cite{stern}只给出一个数字 - [1]

答案1

您必须定义新的宏才能做到这一点。一种方法是借鉴 harvard.sty 的做法,写成

\documentclass{article}

\makeatletter
%% this is from harvard.sty -- used inside "long" cites to prevent expansion
{\catcode`\:=12 \catcode`\-=12 \catcode`\>=12 \catcode`\<=12 %
 \gdef\codeof#1{\expandafter\codeof@\meaning#1<-:}%
 \gdef\codeof@#1:->#2<-:{#2}}
%% wrapper around the bibitems
\def\bibwrap#1#2{%
\bibitem{#1}#2%
\if@filesw{\def\next{{#2}}%
           \immediate\write\@auxout{\string\long@bibcite{#1}\codeof\next}}%
\fi}
%% commands for "long" cites
\def\long@bibcite{\@newl@bel y} %in .aux file
\def\long@cite#1{\csname y@#1\endcsname% for use by user
    \immediate\write\@auxout{\string\citation{#1}}}
\def\longcite#1{[\long@cite{#1}]}
\makeatother

\begin{document}
... \longcite{stern}

\begin{thebibliography}{99}
\bibwrap{stern}{Frederick Stern, Conditional expectation of the duration in the classical ruin problem, Math. Mag. 48 (4) (1975) 200-203}
.....
\end{thebibliography}
\end{document}

(我不太记得我第一次在哪里找到有问题的代码片段,它们并不是完全原创的。)

相关内容