Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using JabRef for my references. I export them as a .bib file and import them into LyX. They are all sorted correctly and referenced fine in the text. However, when I look in the actual bibliography section of my paper they look pretty ugly: some have URL's, some have extra spaces that look unprofessional. Is there a way to make all of the references that are printed have the same fields and format?

MWE:

Here are two bibtex entries:

@ARTICLE{ADRIAN2008,
  author = {Adrian, Tobias And Rosenberg, Joshua},
  title = {Stock Returns and Volatility: Pricing the Short-Run and Long-Run
    Components of Market Risk},
  journal = {The Journal of Finance},
  year = {2008},
  volume = {63},
  pages = {2997--3030},
  number = {6},
  doi = {10.1111/j.1540-6261.2008.01419.x},
  issn = {1540-6261},
  owner = {home},
  publisher = {Blackwell Publishing Inc},
  timestamp = {2013.01.31},
  url = {http://dx.doi.org/10.1111/j.1540-6261.2008.01419.x}
}

@ARTICLE{Ang2006,
  author = {Ang, Andrew and Chen, Joseph and Xing, Yuhang},
  title = {Downside Risk},
  journal = {Review of Financial Studies},
  year = {2006},
  volume = {19},
  pages = {1191-1239},
  number = {4},
  abstract = {Economists have long recognized that investors care differently about
downside losses versus upside gains. Agents who place greater weight
on downside risk demand additional compensation for holding stocks
with high sensitivities to downside market movements. We show that
the cross section of stock returns reflects a downside risk premium
of approximately 6% per annum. Stocks that covary strongly with the
market during market declines have high average returns. The reward
for beasring downside risk is not simply compensation for regular
market beta, nor is it explained by coskewness or liquidity risk,
or by size, value, and momentum characteristics. (<I>JEL</I> C12,
C15, C32, G12)},
  doi = {doi:10.1093/rfs/hhj035},
  owner = {home},
  timestamp = {2013.01.31},
  url =     {http://www.ingentaconnect.com/content/oup/revfin/2006/00000019/00000004/art01191}
}

The LyX file:

%% LyX 2.0.5.1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[11pt,openbib]{article}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}
\setlength{\parskip}{\medskipamount}
\setlength{\parindent}{0pt}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
\bibliographystyle{plainnat}
\nocite{*}
\bibliography{C:/Users/home/Desktop/test}

\end{document}

It does look like part of the problem is that some entries have more information than others: ie URL's, etc. Do I have to edit each one or can BibTeX be run to only display certain aspects of an entry to make them all the same?

share|improve this question
1  
Normally bibtex should take care of most of this stuff by itself. Could you provide us with a minimal working example (MWE), please? –  Benedikt Bauer Jan 31 '13 at 20:54
3  
Quite often, ugly references are a sign of missing fields in the .bib entry. –  Brent.Longborough Jan 31 '13 at 21:13
    
hi guys. just added the mwe. it looks way better than my current big doc. i'll see if missing fields are the problem but ALL the references are ugly so i don't think that's it –  Alex Jan 31 '13 at 21:14
    
Can you post a small PDF image showing a couple of of references? Normally, to disable certain fields in bibtex, I think the only option is to edit .bst style file that you are using. Unless of course the style has options that you can set in the preamble. Check natbib documentation, if you are using natbib. Failing all of this, consider using biblatex. It has extensive options for disabling fields. –  cryptic0 Jan 31 '13 at 21:31
    
i am using natbib in fact. i don't have a .bst file though.. is that generated automatically by bibtex or do i need style files that i somehow import into lyx? –  Alex Jan 31 '13 at 21:42
show 1 more comment

1 Answer 1

up vote 2 down vote accepted

The style of the references is not much depending on the data in the .bib file (or a program like JabRef). The main factor is the chosen bibliography style of your document. It determines which fields are shown.

Suggestions to improve the looks:

  • If URLs occur in your document (e.g. in the references) you can add

    \usepackage{url}
    

    to the preamble (in LyX Document > Settings... > LaTeX Preamble). Then long URLs like in your second reference will have a proper line break. Not necessary if package "hyperref" is used, see Forcing linebreaks in \url.

  • If "extra spaces that look unprofessional" refer to the line breaks after every field in the references then removing the document option openbib helps (in LyX Document > Settings... > Document Class); see Natbib puts reference data one line per item or Custom references page with additional line breaks.

  • Of course, a bibliography style different from "plainnat" can be choosen in LyX by a right click on "BibTeX Generated Bibliography" and then "Settings...".

  • Nevertheless, a little edit of your .bib file (with JabRef) could be done:

    • The URL of "ADRIAN2008" should be cleared since it replicates the DOI entry. (In JabRef, an clickable icon with hyperlink is shown for a non-empty URL field. If the URL field is empty but not the DOI field then still a clickable icon is shown. It provides the hyperlink http://dx.doi.org/<DOI field value> automatically.)

    • Dashes: - vs. – vs. —: pages = {1191-1239} should be pages = {1191--1239} for the right length of the dash.

    • doi = {doi:10.1093/rfs/hhj035} should be doi = {10.1093/rfs/hhj035}.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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