// ===============================================================================
// -*- DATA:INI:EDT -*-
//
// WinEdt Errors
//
// ===============================================================================

[BUILD]

REQUIRES=20111017

// ===============================================================================

[ERRORS]

// ===============================================================================

// Before you conclude that this error detection is a pretty complicated business
// take a good look at the log file produced by TeX or its accessories. It lacks
// structure and it does not follow any clear conventions that would make it easy
// to locate Errors and Warnings in your source files. Even locating the source
// file in a multi file document based on the info in TeX's log file is far from
// trivial. In other words: TeX's log files are a genuine mess!

// Default settings should work for most users. However, it is possible that you
// are using yet another package or accessory with its own "ingenious" way of
// reporting errors and warnings. WinEdt may miss such errors or warnings or else
// interpret certain warnings as errors and vice versa...
// If so, try RegEx as triggers and exceptions!

// See also the section on Error Log Parsing in WinEdt's Configuration Manual!

// ===============================================================================

LOG_FILE="%O\%N.log"
ESC_STRING=":"
ESC_DELAY=0

PROCESS_WARNINGS=1
AUTO_UPDATE=1
UPDATE_ON_FOCUS=0
SHOW_LOG_DATE=1

SOURCE_TRACKING=1
QUICK_MODE=0

// Just in case you have to filter out some junk...
TRANSLATION_TABLE=""

// C-style Errors, eg.:
//
//     ! Undefined control sequence.
//     morris.tex(9) : ...ed control sequence test \crash
//       or
//     morris.tex:9: Undefined control sequence
CPP_ERRORS=1
// When non-empty the c-style error must start with this string...
CPP_TRIGGER=""

// Parse the log line and see if the source line number can somehow be guessed...
EXTENDED_ERRORS=1

// Downgrade Errors of Type I to Warnings if the word warning appears within
// specified lines (0..9) before the Error... This filters out some unwanted
// warnings produced by some LaTeX packages and TeX accessories...
ERROR_FILTER=5

// LaTeX and many of its packages are quite verbose!
// Consequently log file is full of "stuff" that should be ignored...
// Optimize the algorithm by ignoring short/empty lines in log file and lines
// starting with certain characters that we are quite sure don't contain errors
// or warnings...
MINIMAL_LINE_LENGTH=3
IGNORE_START_CHARACTERS="\]() "

// ===============================================================================

// Regular Expressions can be used in specifying Trigger Strings.
// However, they come at a cost so use them sparingly (only when needed).
// REGULAR_EXPRESSIONS values:
//   0 - ordinary string at beginning of line
//   1 - ordinary string inside a line
//   2 - true RegEx (can be slow!)

// Exception Strings (if needed to be specified) are always RegEx!

// Both triggers and exceptions are case-sensitive.

// The order in which TRIGGER strings are specified is important: the first one
// is matched!

// Types I..IX are hardcoded. You can not add more error types and the order of
// Error TYPE(s) in this file should not be changed!

// Except for adding/removing triggers and exceptions there isn't much you can
// modify in this file...

// ===============================================================================

TYPE="Type I:   ?<Line Number>"
  REGULAR_EXPRESSIONS=0
  WARNING=0
  ENABLED=1
  MODE_FILTER="TeX;MetaPost;MetaFont"
  TYPE_FILTER="log"
    TRIGGER="l."
    // Filter out TeX4ht messages
    EXCEPTION="TeX4ht warning"

TYPE="Type II:  ?...<From>--<To>"
  REGULAR_EXPRESSIONS=0
  WARNING=1
  ENABLED=1
  MODE_FILTER="TeX"
  TYPE_FILTER="log"
    TRIGGER="Overfull \"
    TRIGGER="Underfull \"

// For Type III Warnings with RegEx=2 only:
// the first Tag[0] string in the source line/paragraph is selected (if non-empty)
// That's how WinEdt can select the actual undefined reference (xxx) from message:
// LaTeX Warning: Reference `xxx' on page 1 undefined on input line 21.
TYPE="Type III: ?<String>...[Line]"
  REGULAR_EXPRESSIONS=2
  WARNING=1
  ENABLED=1
  MODE_FILTER="TeX"
  TYPE_FILTER="log"
    TRIGGER="<{LaTeX|Package natbib} Warning: *{`|'}\(*\)'"   // Select Tag 0!
    TRIGGER="<{LaTeX|Package|Class} *Warning:"

TYPE="Type IV: ? ..."
  REGULAR_EXPRESSIONS=0
  WARNING=0
  ENABLED=1
  MODE_FILTER="TeX"
  TYPE_FILTER="log"
    TRIGGER="<*>"
    TRIGGER="or enter new name. (Default extension:"
    TRIGGER="!pdfTeX error"
    TRIGGER="!LuaTeX error"

TYPE="Type V:  ? ..."
  REGULAR_EXPRESSIONS=0
  WARNING=1
  ENABLED=1
  MODE_FILTER="TeX"
  TYPE_FILTER="log"
    TRIGGER="pdfTeX warning"
    TRIGGER="LuaTeX warning"
    TRIGGER="No file"
    // These are collected as Errors and downgraded
    EXCEPTION="(ext4)"

TYPE="Type VI:   ? ..."
  REGULAR_EXPRESSIONS=1
  WARNING=0
  ENABLED=1
  MODE_FILTER="TeX"
  TYPE_FILTER="blg"
    TRIGGER="---"
    TRIGGER="ERROR -"
    TRIGGER="FATAL -"

TYPE="Type VII:  ? ..."
  REGULAR_EXPRESSIONS=1
  WARNING=1
  ENABLED=1
  MODE_FILTER="TeX"
  TYPE_FILTER="blg"
    TRIGGER="Warning--"
    TRIGGER="WARN -"

TYPE="Type VIII:  ...? <filename> :"
  REGULAR_EXPRESSIONS=0
  WARNING=0
  ENABLED=1
  MODE_FILTER="HHC;XWE"
  TYPE_FILTER="log"
    TRIGGER="Error:"

TYPE="Type IX:    ...? <filename> :"
  REGULAR_EXPRESSIONS=0
  WARNING=1
  ENABLED=1
  MODE_FILTER="HHC;XWE"
  TYPE_FILTER="log"
    TRIGGER="Warning:"
    TRIGGER="Note:"
    TRIGGER="Hint:"

// ===============================================================================

[END]
