TeXnicle
TeXnicle is my favourite editorfor writing LaTeX documents. It is available for Max OS X.
So I’d like to use it when writing knitr‘s Rnw-files.
Rnw-files are LaTeX-files with embedded R-code in it. So Rnw-files need to bepreprocessed. The result is a tex-file which will be compiled by pdflatex or xelatex.
TeXnicle is described as 'is LaTeX editor designed for Mac OS X. It runs on Snow Leopard and Lion on 32-bit and 64-bit systems. TeXnicle is free (as in beer) and will remain so' and is an app in the Development category. There are seven alternatives to TeXnicle for a variety of platforms, including Linux, Windows, Mac, the Web and Android. The best practice to install MiKTeX, TeXnicCenter and Adobe or better SumatraPDF do the following: Download the installer program for MiKTeX (I suggest the complete installation, so use net installer to avoid missing packages like your fancyhdr.sty!); Install MiKTeX.
Processing is done by so called engines. TeXnicle comes with a bunch of differentengines. You can see them in preferences (hit ⌘-,) on tab “Typesetting”.
So we need to create a new engine which does knitr’s preprocessing.Just copy an existing one.
The engines are stored in
Use your favourite text-editor and add these lines:
between these lines here:
Also change the following line from
to
Save this new engine as xelatex_knitr.engine. Now you should see it in preferences after a restart of TeXnicle:
Technical College
Now you can create a new TeXnicle-project.Create a new file in it and use the extension .Rnw.
Techniclean Xhp
Last but not least you must choose the new engine for this project:
Hitting ⌘-r processes the Rnw-file and generates (hopefully) a pdf-file: