R Markdown v2 – knit html, knit pdf and knit word

Yes ….. pdf is good but sometimes MS Word is needed. Great piece of work, Yihui..

Let me summarize it:

============================================================

This — the rmarkdown — can make you

‘knit HTML’, also

‘knit PDF’ and yes

‘knit Word’

 

============================================================

Setting Lyx to use biblatex package

First, read this website: biblatex and Lyx

The steps that work for me are :

1) With LyX 1.6.0 and newer:

  • Put the file biblatex.module in the layouts folder in your user directory. (Help→About LyX tells you where you can find this directory; in the latest versions of OSX the correct layouts folder is in the applications folder).
  • Run Tools→Reconfigure, restart LyX and select the module “Biblatex-citation-styles” from Document→Settings→Modules.

2) In the document preamble (Document→Settings→Preamble), load biblatex manually. If you want to use an author-year style (and thus use the above module/layout addition), you have to use the package option “natbib=true”. So, for instance:

 usepackage[style=authoryear,natbib=true,backend=bibtex]{biblatex}
For a numeric or alpha-numeric style, you just need something like:

usepackage[style=numeric,backend=bibtex]{biblatex}
NOTE: setting biber in tools DOES NOT WORK FOR ME…
3)  Load your bibliography database in the preamble:

  • addbibresource{<name of bib-file with .bib-extension>}
(you might also use the deprectaed command bibliography{<name of bib-file without .bib-extension>})
  • Note that the bib file must either be located in your texmf tree, or you must enter an absolute path in the command above (e.g.addbibresource{/Users/me/Documents/bibdesk/Dissertation.bib} on the Mac, addbibresource{/home/myname/documents/dissertation/Dissertation.bib} on Linux,addbibresource{C:/Documents and Settings/My Name/Documents/Dissertation/Dissertation.bib} on Windows). If you put the file in the texmf tree, do not forget to run “texhash” in the terminal to tell LaTeX where to find the new file.
  • NOTE : For Windows users, USE / not . Use full path address to your bib file
  • Multiple databases must be loaded by multiple addbibresource commands (or separated by commas, if you use the deprecated bibliography command instead).

4) In the document, insert the BibTeX inset (Insert→List/TOC→BibTeX Bibliography… ) in a LyX note or comment, such that LyX finds the citations, but no bibliographycommand is output to LaTeX. It does not matter which style you chose here, so you can stick with “plain”. However, in order to use the citation dialog, you’ll have to choose the correct databases (i.e. those you loaded above in item (3)).

5) In the document, enter printbibliography in ERT (TeX mode) at the place where the bibliography shall occur.

NOTE : I copied and pasted the information from http://wiki.lyx.org/BibTeX/Biblatex, but only used the parts that work for my Lyx .. KIM