This function parses a standard LaTeX log file and applies
patches to it based on an Sweave concordance, so that error
messages and warnings refer to the .Rnw
file rather than the
.tex
file.
patchLog(f, newname = f, concords = NULL, max_print_line = 79, Cstyle = FALSE)
This function is called mainly for the side effect of writing the
new log file. It returns the concords
object invisibly.
The filename of the log file.
The filename to write the patched file to.
Concordances read from the .dvi
or .pdf
. If NULL
,
an attempt is made to read these from the source.
The line length at which the latex compiler will wrap error messages.
If TRUE
, only look for C-style error messages "filename:num: msg"
.
If FALSE
, look for classic messages "! msg"
. If
NA
, look for both, pick the more popular style.
Duncan Murdoch
The parsing is based on the log parser written by
Jonathan Kew, Stefan Löffler, Antonio Macrì, and Henrik Skov Midtiby for
TeXWorks. That parser assumes error lines are reported in the standard format;
C style errors are not currently supported. patchLog
can detect C style errors, but standard format is assumed by
default, and is preferred.
patchDVI
, patchSynctex