Generalcan I use \verbatim in my .bib file?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
User avatar
mappo
Posts: 25
Joined: Thu Nov 29, 2007 11:19 am

can I use \verbatim in my .bib file?

Post by mappo »

This is what annoys me at the moment.

My *.bib file:

Code: Select all

@misc{S,
author = {Lane, Lois},
title ={Clark Kent is Superman!},
note = {\newline\texttt{www.thedailyplanet.com}}
}
I use @misc since it's actually a web site I'm citing.

This is my output:
Lois Lane. Clark kent is superman!
http://www.thedailyplanet.com.


I'm only a little bothered by the dot after `Lane'. The dot after the URL is much more annoying.
Why is `kent' and `superman' written in all lower-case?
And the most important question: What file do I edit to fix this - the .cls or the .bst.

The answer to the question in the thread title: No, you can't (but \newline and \texttt{} works just fine...)!
If you don't recycle, you're throwing it all away.

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

can I use \verbatim in my .bib file?

Post by Stefan Kottwitz »

Hi Mappo,

I recommend to use \url from the url package for citing websites.
Considering the other questions I did not tested that yet, perhaps you can give some more information like you used bibliography style.

Stefan
LaTeX.org admin
User avatar
T3.
Posts: 208
Joined: Fri Mar 14, 2008 12:58 pm

can I use \verbatim in my .bib file?

Post by T3. »

mappo wrote: Why is `kent' and `superman' written in all lower-case?
And the most important question: What file do I edit to fix this - the .cls or the .bst.
To prevent bibtex from formating some parts of the title, just put them in braces:

Code: Select all

@misc{S,
author = {Lane, Lois},
title ={{C}lark {K}ent is {S}uperman!},
note = {\newline\texttt{www.thedailyplanet.com}}
}
User avatar
mappo
Posts: 25
Joined: Thu Nov 29, 2007 11:19 am

can I use \verbatim in my .bib file?

Post by mappo »

Stefan_K: Why do you recommend \url{}?
I did this:

Code: Select all

@misc{S,
author = {Lane, Lois},
title ={{C}lark {K}ent is {S}uperman!},
note = {\url{www.thedailyplanet.com}}
}
There was no difference between using \url{} and using \texttt{} (at least none
I could see viewing my .dvi file) so why use more packages than necessary?
I'm using someone else's .bst file, but switching to \bibliographystyle{plain}
changed nothing.

T3.: Great advice with the brackets! It solves the lower case issue, but
unfortunately not the dots.
If you don't recycle, you're throwing it all away.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

can I use \verbatim in my .bib file?

Post by Stefan Kottwitz »

Hi Mappo,
mappo wrote:There was no difference between using \url{} and using \texttt{} (at least none
I could see viewing my .dvi file) so why use more packages than necessary?
Then you don't need it for this specific address. But \texttt will not work if you have underscores _ inside the address, for example, or if you have very long addresses that might need a linebreak. That are not unusual cases, that's why I recommended \url.

Stefan
LaTeX.org admin
User avatar
mappo
Posts: 25
Joined: Thu Nov 29, 2007 11:19 am

Re: can I use \verbatim in my .bib file?

Post by mappo »

Those are two good reasons - twice what I asked for ;)
Thank you for that!
If you don't recycle, you're throwing it all away.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: can I use \verbatim in my .bib file?

Post by Stefan Kottwitz »

Hi Mappo,

The issue with the dots is still open. I guess the bst file is responsible for adding the dot after an antry. Have a look inside that and/or post it here as attachment.

Stefan
LaTeX.org admin
User avatar
mappo
Posts: 25
Joined: Thu Nov 29, 2007 11:19 am

Re: can I use \verbatim in my .bib file?

Post by mappo »

Great, thank you.

As I wrote earlier, I'm using \bibliographystyle{plain} and not a separate .bst file.
If you don't recycle, you're throwing it all away.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

can I use \verbatim in my .bib file?

Post by Stefan Kottwitz »

Hi Mappo,

I remember you wrote I'm using someone else's .bst file, perhaps it's easier to change there.
But you can also change plain.bst. Open it and look for:

Code: Select all

FUNCTION {fin.entry}
{ add.period$
  write$
  newline$
}
You could remove add.period$, that may do it.
Perhaps consider to change a copy of plain.bst and work with it instead, its usually not recommendable to alter original files.

Stefan
LaTeX.org admin
User avatar
mappo
Posts: 25
Joined: Thu Nov 29, 2007 11:19 am

Re: can I use \verbatim in my .bib file?

Post by mappo »

Beautiful!
Thank you very much.

Stick a fork in this thread - it's done!
If you don't recycle, you're throwing it all away.
Post Reply