GeneralWrite text before first item in thebibliography environment

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Zoulou974
Posts: 2
Joined: Tue Jun 24, 2008 12:42 pm

Write text before first item in thebibliography environment

Post by Zoulou974 »

Hello,
I haven't found my question in the forum so I ask it here :
How can I write some text in a thebibliography environment, before the first \bibitem ?
What I want is to divide my bibliography in two parts, and I would like the solution to be not too complicated (avoiding bibteX if possible).

Here is my code :

Code: Select all


\begin{thebibliography}{50}

References I've used :   %1

\bibitem{Harr-Pliska} J. Michael Harrison and Stanley R. Pliska, \emph{Martingales and stochastic integrals in the theory of continuous trading}, Stochastic processes and their applications, 1981, volume~11, pages~215--260.


Other references :   %2


\bibitem{Bachelier} Louis Bachelier, \emph{Th\'eorie de la sp\'eculation}, Annales scientifiques de l'Ecole Normale Supérieure, Sér. 3, 17 (1900), p. 21--86.

\end{thebibliography}

When I use TeXmaker, it refuses to compile (error messages and no .ps file).
With TeXnicCenter it compiles, but if the line 1 is present, I lose the numbering ([number]) and the listing (it's all in a single paragraph).
Note that if I remove the line 1, it works perfectly (the line 2 doesn't cause trouble).

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Write text before first item in thebibliography environment

Post by Stefan Kottwitz »

Hi Zoulou974,

welcome to this board!
Try this inside the bibliography environment:

Code: Select all

\hspace{-\leftmargin}\parbox{\textwidth}{Other references:  ...}
Stefan
LaTeX.org admin
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Write text before first item in thebibliography environment

Post by Juanjo »

The thebibliography is just an environment like enumerate. If fact it uses the counter enumiv for numbering. So you can apply commands that work in any list environment. In addition to that given by Stefan, you can simply try:

Code: Select all

\begin{thebibliography}{99}

  \item[\bfseries References I've used:]

  \bibitem{...} ..........
  \bibitem{...} ..........
  \bibitem{...} ..........

  \item[\bfseries Other references:]

  \bibitem{...} ..........
  \bibitem{...} ..........
  \bibitem{...} ..........

\end{thebibliography}
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
Zoulou974
Posts: 2
Joined: Tue Jun 24, 2008 12:42 pm

Re: Write text before first item in thebibliography environment

Post by Zoulou974 »

Hey, thanks for the answer and the welcoming.

I've briefly tried Stefan_K 's solution (i don't understand it by the way), it seems to work (at least put as the title of the second part of my bibliography) but it cannot be put as he first line in thebibliography environment, and if put after the first item, it writes above the text of the first item ... anyway Juanjo's solution works perfectly.


I just add a few remarks of mine in case someone with my problem and my knowledge ever read this topic. What I write may be incorrect, that's just what I've understood.

*the \bfseries command is here only to put what comes after in bold font,

*Yeah, a thebibliography environment is just an environment, and \item work in it ! Just, if you turn a bibitem into an item,
-the label, put inside the {} for \tbibitem appears in the result (cf 4th star)
-\cite doesn't refer to the item anymore, of course ...

*An (bib)item ends only with the beginning of the next item or the end of the environment. And an environment cannot contain anything else than items, that's why we have to use a trick here.

*After an item, putting the text into {} or just raw after the command doesn't change anything. but putting it into [] supress the numbering. And that's actually what is done to solve my problem : create unnumbered item, where I write the text I want.


Zoulou.
Post Reply