yihui / lyx-R

support for R in LyX (Sweave and knitr, ...)
http://yihui.name/knitr/demo/lyx/
28 stars 11 forks source link

R Journal LyX template suggestions #9

Closed scottkosty closed 11 years ago

scottkosty commented 11 years ago

These commits make some changes to the R Journal LyX template. Most changes are just out of personal preference that I think others will also prefer. The PDF output should be identical.

The most controversial change I'm suggesting is to move the \begin{article} and \end{article} out of the template and into the layout. We discussed this before and you preferred to leave the ERT. I think your preference was not strong, which is why I am suggesting the change again. If it is a strong preference, I have no problem abandoning this change (or any other change). I like the change because in my opinion templates are meant to make it as easy as possible to get started writing. Not only does this get rid of ERT, it gets rid of the notes explaining the ERT, and the author does not have to think about why this environment is needed anyway. In my opinion, ERT should be used when we want to give the author some control, but I don't see anything to control/customize here.

After your comments, the next step is to ask lyx-devel for comments, and then I think we could commit to the LyX repo.

yihui commented 11 years ago

I did not know the \AtBeginDocument trick. This looks good. Thanks!