If I understand you correctly, you can do this with biblatex
, which is a quite new LaTeX package for dealing with bibliographies. As LyX hasn't built in support for this in the GUI yet, there is some initial setup required. The information in this answer comes from two sources:
The LyX wiki: http://wiki.lyx.org/BibTeX/Biblatex
Sorting the bibliography by entry type
Setting up LyX for biblatex
You have to install a biblatex
module, which is can be downloaded at http://wiki.lyx.org/uploads/BibTeX/biblatex.module Place the biblatex.module
file in the layouts folder in the LyX user directory, the location of which is listed in Help --> About LyX. Reconfigure and restart LyX.
Change document settings
Go to Document --> Settings, and do the following:
Under Modules, add the Biblatex-citation-styles module.
Under Bibliography, change
Processor to biber
Citation to Natbib, and Natbib style to Author-year
Under LaTeX Preamble, add the following:
\usepackage[style=authoryear, natbib=true]{biblatex}
\addbibresource{path/to/your/bibfile.bib}
of course changing the path to the bib-file. I think you need the complete path, and the file ending must be included.
In the document
To be able to use the LyX GUI to add citations, you have to trick LyX to search that file by first adding a LyX Note with Insert --> Note --> LyX Note, and then do Insert --> List/ToC --> BibTeX bibliography with the cursor inside the note.
Add an unnumbered (or numbered, depending on requirements) chapter (or section, if you're using an article-class) heading, called Bibliography or References, or whatever you like. Then you have to add something like
\printbibliography[type=book,title={Books},heading=subbibliography]
\printbibliography[type=article,title={Articles},heading=subbibliography]
\printbibliography[nottype=book,nottype=article,title={Miscellaneous},heading=subbibliography]
in an ERT (Insert --> TeX Code, or Ctrl + L) where you want to print the reference lists. Note the type=<reference type>
, which defines that the reference list printed there has only one type of source, and the title=Something
that changes the heading of the reference list. You have to add one \printbibliography
for each type of source.
heading=subbibliography
causes the heading to be typeset with a heading that is one level below the highest level. That is, section for book or report classes (where chapter is the highest), or subsection for article classes (where section is the highest).
In the last one nottype
is used instead, which prints everything that does not have the specified entry type. Note there is one such for article, one for book.
Image example. Here I added three citations from biblatex-examples.bib
, one book, one article, and one something else:
Best Answer
You should
use a bibliography style that can generate authoryear-style citation call-outs,
load the
natbib
package with the optionauthoryear
, anduse the instruction
\citep
to generate "parenthetic" citation call-outs, e.g.,(Author, Year)
, and use\citet
to generate "textual" citation call-outs, e.g.,Author (Year)
.Note that some bibliography styles cannot generate authoryear-style citation call-outs. E.g.,
plain
,abbrv
andunsrt
can generate only numeric-style citation call-outs. (Useplainnat
,abbrvnat
, andunsrtnat
instead...)