check if a source document is using the Sweave noweb syntax
if an Rnw document is using Sweave Noweb syntax, pop up a message box as reminder
this trick of error hook is more of a hack; use stop_on_error instead
an example of converting the official Sweave example
remove extra lines of @ in Sweave documents
roxygenize
mention the message box to remind Sweave2knitr() in the news
reword message
escape_latex() can also preserve spaces now and messages in LaTeX will keep spaces
if chunk option include=FALSE, use stop_on_error=2L; fixes #453
bump version
encoding for readLines() is almost useless; use file(encoding) instead
a better in.file detection: if input is a connection based on a file, it also counts as a 'file'
use encoding only if it is in iconvlist()
if input is not missing, copy it to input2, and make sure 'input' is a character string of the file path

if input is a connection, extract the filename from summary(connection)
now 'input' is the character path, and input2 is the original input (may be a connection or whatever readable)
if input2 is a character string, use file(input2, encoding), otherwise use it as is
before writing the output, make sure to use the encoding if it is not empty

this preserves user's original encoding setting
similarly Sweave2knitr() handles encoding correctly now
roxygenize