0

I'm struggling to enter the whole text of citation. I have added bibliography into the document:

\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}

Is it possible to cite the text without mentioning the number?

For example, I want to insert all information of bibitem{stern} in document:

We present a unified approach which uses generating functions to prove and extend some results that were obtained in [Frederick Stern, Conditional expectation of the duration in the classical ruin problem, Math. Mag. 48 (4) (1975) 200-203]

\cite{stern} gives just a number - [1]

3
  • Have a look to overleaf.com/learn/latex/bibliography_management_with_bibtex and then be more explicit with your question, show an example of what do you have and what would you like to have – scd Oct 15 '20 at 10:00
  • Since you are using a manually generated thebibliography environment and not biblatex I have retagged your question. – moewe Oct 15 '20 at 11:45
  • But to address the question: If you are writing your bibliography entries manually in thebibliography then it is not easy to repeat the entire citation in the document body. You'd have to somehow grab the entire entry data and store it for later processing. That's not totally out of the question, but really quite tricky. – moewe Oct 15 '20 at 11:52
0

You have to define new macros to do this. One way is to take a leaf out of harvard.sty and write

\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}

(I don't quite remember where I first found the code snippets in question, they are not entirely original.)

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.