Hmmmm,
so getting things working with ClassicThesis is harder than I thought.
I've resolved most of the conflicts between the classicthesis.sty,
preamble.sty and the preable that you gave in your example. (like you
said, those were related to natbib, hyperref, backref). So I feel I'm
90% there! However, as soon as I add the code below to my
ClassicThesis.lyx preamble, things fail.
But I cannot make sense of the errors, nor locate where they are
coming from (is there any way to get more verbose error messages from
lyx?). What follows is the first error out of many:
Error: "You can't use '\spacefactor' in vertical mode."
Description: " \@
ifundefined{showcaptionsetup}{}{%
Sorry, but I'm not programmed to handle this case;
I'll just pretend that you didn't ask for it.
If you're in the wrong mode, you might be able to
return to the right one by typing `I}' or `I$' or `I\par'.
"
Do you have any ideas where I should look?
Thanks!!
yannick
--------------------
% responsible for converting the citekeys to pretty citations
\makeatletter
\AtEveryBibitem{%
\iffieldequals{namehash}{\...@prevhash}
{}
{\addvspace{0.8\baselineskip}}% 0.8\baselineskip o altra misura
\savefield{namehash}{\...@prevhash}}
\AtBeginBibliography{%
\let\...@prevhash\undefined}
\makeatother
On 3 Sep 2009, at 16:18, Yannick Wurm wrote:
Hello Pierfranco,
thank you very much for the rapid and exhaustive reply!
After setting things up the way you outlined, I could only get
your .tex document to create the references correctly if I replaced
the "refsegment" with "refsection" as is it found in the "10-
references-per-section.tex" file.
Bringing things into lyx worked as planned which is a very pleasant
surprise.
I haven't yet tried combining it all into my thesis chapters (which
are separate documents), but will look into that after a good cup of
coffee.
Thanks again and kind regards,
Yannick
On 2 Sep 2009, at 18:39, Pierfranco Minsenti wrote:
Hi Yannick,
I have very recently tested a solution to your problem using the
biblatex package. Even if biblatex is still beta I can assure you
that it is a very effective and easy solution, very flexible and
adaptable to different needs. Read the instruction on the LyX wiki
dedicated to the use of biblatex at http://wiki.lyx.org/BibTeX/Biblatex
.
It is indispensable in your case to install the biblatex package
downloadable from http://www.ctan.org/tex-archive/help/Catalogue/entries/biblatex.html
. Also you will have to install the Perl script bibtexall into an
executable path so that LyX will be able to compile all the files
produced.
Herewith enclosed I add an exemple I have developed modifying an
original file found in the exemples directory of the biblatex
package downloaded from http://www.ctan.org/tex-archive/help/Catalogue/entries/biblatex.html
The code is pure LateX but it has also been tested with LyX and the
KOMAscript report class, so it perflectly works. You just need to
import this file in LyX and make adjustements following the
specific instructions at http://wiki.lyx.org/BibTeX/Biblatex for
using biblatex with LyX.
I can also add that I haven't still used in conjunction with the
LyX port of the ClassicThesis style which I am also using, but I
plan to do it very soon and I think I will only have to modify the
original files related to the LyX port of the ClassicThesis style
by commenting out fthe packages and options related to:
1) natbib
2) backref package (you will use the specific functions provided by
biblatex)
besides it is absolutely important to put the biblatex package
before the hyperref package.
Herewith you can see the exemple I have obtained using pure LaTex
code for producing lists of references printed at the end of each
chapter. Obviously this example can only work in conjunction with
the examples.bib file put in the exemples directory of the biblatex
package.
\documentclass[english,a4paper,twoside]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{babel}
%
\usepackage[babel]{csquotes}
\usepackage[style=authoryear,
natbib=true,
hyperref=auto,
backref=true,
date=long,
urldate=long,
block=space,
]{biblatex}
%
%HYPERREF
\usepackage
[pdftex
,a4paper
,plainpages
=
false
,pdfpagelabels
,bookmarks
=
true
,colorlinks
,breaklinks
,bookmarks
=true,bookmarksopen=true,bookmarksnumbered=true,pageanchor=true,
hyperfootnotes=false,
pdfstartview=FitV]
{hyperref}
%
%HYPERSETUP
\hypersetup
{colorlinks=true,linkcolor=red,citecolor=red,urlcolor=blue}
%
\bibliography{examples}
%
\defbibheading{references}{\section*{References}} % heading for the
various References sections put in each chapter
%
%
% added more vertical space among records because default space in
authorcite style is =0
%
\makeatletter
\AtEveryBibitem{%
\iffieldequals{namehash}{\...@prevhash}
{}
{\addvspace{0.8\baselineskip}}% 0.8\baselineskip o altra misura
\savefield{namehash}{\...@prevhash}}
\AtBeginBibliography{%
\let\...@prevhash\undefined}
\makeatother
%
\title{My Dissertation}
\author{Firstname Lastname}
\date{}
%
%__________________________________________
\begin{document}
\maketitle
\tableofcontents
\chapter{Title of first chapter}
\begin{refsegment}
This is just filler text \parencite{massa}.
This is just filler text \parencite{augustine}. This is just filler
text \parencite{cotton}. This is just filler text
\parencite{hammond}.
%
\printbibliography[heading=references]
\end{refsegment}
\chapter{Title of second chapter}
\begin{refsegment}
This is just filler text \parencite{hammond}. This is just filler
text \parencite{massa}. This is just filler text \parencite{cotton}.
This is just filler text \parencite{murray}.
%
\printbibliography[heading=references]
\end{refsegment}
\chapter{Title of third chapter}
\begin{refsegment}
This is just filler text \parencite{murray}. This is just filler
text \parencite{augustine}. This is just filler text
\parencite{cotton}.
This is just filler text \parencite{bertram}.
%
\printbibliography[heading=references]
\end{refsegment}
%
%__________________________________________________
\end{document}
Best wishes
Pierfranco
2009/9/2 Yannick Wurm <yannick.w...@unil.ch>
Hello,
I'm trying to write my thesis with the excellent Lyx port of
classicThesis (uses Koma). However, I prefer keeping my
bibliographies separate (ie one bibliography per chapter).
I don't have deep understanding of Latex, but found some 2002 posts
to this list relative to using bibunits. I tried those as well as
looking at chapterbib.
The simplest I could attempt to do was to compile the following
example:
http://wiki.lyx.org/Examples/Bibunits
Suprisingly, it doesn't work (I obtain only one single bibliography
at the end). Here's the output:
http://yannick.poulet.org/scratch/bibunits_KomaArticle.pdf
I'm running this on Lyx 1.6.3 on Mac OS 10.5.8 and the pdflatex
version I think I'm using is:
pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
Do you have any ideas?
Thanks & regards,