Nethence Documentation Lab Webmail Your IP BBDock  

Those documents are obsolete, please use the Nethence Documentation instead.


Setting up LyX and Biblatex for use with a bibliography file database
IMPORTANT NOTE: my self-made web content manager here doesn't handle escapes very well so in the meantime, please try to guess what's missing (mostly \r and \a).
Install MiKTeX, LyX, and if you with the use an external bibliography database, also install a bib file editor, for exemple JabRef or BibEdt. Jabref has an index field auto-generation feature but some of you won't use it anyway so I guess it's all a matter of taste. And there are also other bib file editors.
Configuration with biber and Biblatex pointing to a bib file
Change the LyX global preferences,
tools > preferences
language settings / spellchecker // spellcheck continuously
output / latex // processor: biber
Now create a new document and change its preferences too,
document > settings
document class // suppress default date on front page
page layout // format: A4
language // language: ...
language // quote style: ...
numbering & toc // numbering: (all to the left)
numbering & toc // list in table of contents: (one bit to the left)
float placement // uncheck use default placement
float placement // here if possible
latex preamble
here's my biblatex optimized preamble,
ddtoaptionsfrenchb{ enewcommand efname{Enquête et bibliographie}}

enewcommand*{\mkbibnamelast}{ extsc}
\letite= ootcite

%biblatex capable
enewcommand{ ewunitpunct}{ddcomma\space}
Note. the last language specified in the babel package arguments becomes the default babel language for the current document.
Nota. babel=other is depreceted. Use autloang= instead.
Note. change the path to the bib file accordingly.
Dealing with a bib file within LyX
Here's an example bib file (here c: est.bib),
title={Le Magn{\'e}tisme animal : {\'E}tudes sur l'hypnose},
year={2006 [1887]},
author={Alfred Binet and Charles F{\'e}r{\'e}},
pages={283 pages},
title={Changing Order: Replication and Induction in Scientific Practice},
publisher={University of Chicago Press},
year={1992 [1985]},
author={Harry Collins},
edition={New Edition},

title={another book title with same author},
author={Harry Collins},
In the new document, include a hidden reference to the bib file for LyX enabled citations,
insert > note > comment
(inside the comment) insert > list / TOC > bibtex bibliography
databases: add your bib file e.g. c:/test.bib
(do not care about the other parameters)
and right after the comment,
ddcontentsline{toc}{section}{Enquête et bibliographie}\printbibliography
note. addcontentsline to force the bibliography to appear into the TOC. Change 'section' to 'chapter' if you are using the book document classe (using 'article' documentclass here). Alternatively there is the tocbibind package.
Ready to go
Use the citation button to insert a few references into the document to check that the bib file is recognized within LyX,
(citation button)
Check that the bibliography system is working correctly outside LyX with Biblatex,
(view button or Ctrl-R)
Check the latex code of your document,
file > export > latex (plain)
Note. it should start with a document class that specifies the A4 paper format (a4paper) and the default -- not babel -- document language (e.g. french).
Note. the fontenc package with T1 argument should be enabled for latin9 (todo, what about utf8?)
Further formatting
For a thesis you may have to place the title, author,
(carriage return may be forced doing Ctrl-Enter)
and eventually address/comments on the first page alone, then,
Ctrl-L hispagestyle{empty}\pagebreak
note. hispagestyle empty to avoid the page number at the bottom.
note. \pagebreak instead of ewpage to that the lines automaticly propagate through the page.
Then after the TOC,
Ctrl-L leardoublepage
or insert > formatting > clear double page
note. leardoublepage to handle paper's front and back side so the text doesn't begins right after the TOC.
Create numbered sections (numbers won't appear anyway) using the upper left test layout dialog.
Before new sections, use ewpage,
  Ctrl-L ewpage
or insert > formatting > new page
At last before the bibliography (\printbibliography) preceded by the hidden LyX feature in a comment,
Ctrl-L leardoublepage
or insert > formatting > clear double page
Generating samples with TeXworks
To switch to biber you will need a custom script,
miktex-pdftex.exe -synctex=1 -undump=pdflatex "%1"
biber.exe "%2"
miktex-pdftex.exe -synctex=1 -undump=pdflatex "%1"
miktex-pdftex.exe -synctex=1 -undump=pdflatex "%1"
biber.exe "%1.bcf"
miktex-pdftex.exe -synctex=1 -undump=pdflatex "%1"
LaTeX and LyX, tips and tricks
LyX Tips for Thesis Writing
Utiliser LyX

Last update: May 23, 2015