Implement a more simple and elegant integration of the R package knitr. Now,
lyxknitr.R does not need to move or copy files at all.
This also fixes a bug: when /tmp was on a different file system (e.g.
encrypted home), lyxknitr.R failed to move files to /tmp because it relied on
R's 'file.rename' function, which in turn relied on the rename function in
<stdio.h>, which was failing with the EXDEV errno.
Patch from Yihui Xie.
s is a valid horizontal position for framebox (as well as for makebox, which
was already parsed correctly). There was even a test case, but with a wrong
reference.
Instead of annoying the user with an automatically created note in the output
document which she needs to delete manually, determine the document language
automatically for documents that use CJK. This is done using a heuristic which
roughly counts the number of characters in each language and sets the one that
is used most often. This is not perfect, but it works for the two major use
cases: A document with only some CJK parts (in this case the babel language is
used), and a document which is mainly written in one CJK language. It is only
a minor problem if the heuristic is wrong, since the TeX export is still
correct, and there is no spell checking support for CJK anyway.
Now all regression tests do pass except for some relative path issues
depending on the location of the build directory.
The previous output was read correctly by LyX as well, but the new version is
more similar to the files written by LyX. Also update TODO with recent file
format changes.
Commit 7cfac95 got rid of empty lines that were created by removing \usepackage
statements. However, it added an additional newline in case the \usepackage
was not at the end of the line. This is now fixed.
A dummy getGuiMessages function was missing. Instead of adding it everywhere, a new file is created that contains all the dummy functions needed by the tests.
The old fix was incomplete (\verb~\~ was translated to \verb~~ in roundtrip).
The real cause for this bug (and also the mistranslation of \href{...}{\}})
was the misbehaviour of Token::character() (see comment in Parser.h): This
method even returns a character if the category is catEscape, and this is not
wanted in most (all?) cases.