Learn R Programming

patchDVI (version 1.11.3)

patchLog: Patch a LaTeX log file.

Description

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.

Usage

patchLog(f, newname = f, concords = NULL, max_print_line = 79, Cstyle = FALSE)

Value

This function is called mainly for the side effect of writing the new log file. It returns the concords object invisibly.

Arguments

f

The filename of the log file.

newname

The filename to write the patched file to.

concords

Concordances read from the .dvi or .pdf. If NULL, an attempt is made to read these from the source.

max_print_line

The line length at which the latex compiler will wrap error messages.

Cstyle

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.

Author

Duncan Murdoch

Details

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.

See Also

patchDVI, patchSynctex