Class: TexLogParser
- Inherits:
-
Object
- Object
- TexLogParser
- Includes:
- LogParser
- Defined in:
- lib/version.rb,
lib/tex_log_parser.rb,
lib/tex_log_parser/patterns/standard_error.rb,
lib/tex_log_parser/patterns/file_line_error.rb,
lib/tex_log_parser/patterns/bad_hbox_warning.rb,
lib/tex_log_parser/patterns/fatal_error_occurred.rb,
lib/tex_log_parser/patterns/highlighted_messages.rb,
lib/tex_log_parser/patterns/runaway_parameter_error.rb,
lib/tex_log_parser/patterns/prefixed_multi_line_pattern.rb more...
Overview
Parses logs (and output) of LaTeX interpreters, e.g. ‘pdflatex`, `xelatex` and `lualatex`. Messages are extracted according to a set of patterns (see below).
Instances are single-use; create a new one for every log and parsing run.
Note: Due to shortcomings in the native format of those logs, please be aware of these recommendations:
- Use `-file-line-error` if possible; it makes for more robust source file and line reporting.
- Ask for log lines to be broken as rarely as possible; see e.g. [here](https://tex.stackexchange.com/q/52988/3213).
Search the sources for `BROKEN_BY_LINEBREAKS` to find all the nastiness (and potential issues) you can avoid by that.
Defined Under Namespace
Classes: BadHboxWarning, FatalErrorOccurred, FileLineError, HighlightedMessages, PrefixedMultiLinePattern, RunawayParameterError, StandardError
Constant Summary collapse
- VERSION =
'1.1.0'
Instance Attribute Summary collapse
-
#VERSION ⇒ String
The version of TexLogParser.
Attributes included from LogParser
#messages, #scope_changes_by_line
Instance Method Summary collapse
-
#initialize(log) ⇒ Object
constructor
Creates a new instance.
Methods included from LogParser
Constructor Details
permalink #initialize(log) ⇒ Object
Creates a new instance.
This parser will read lines one by one from the given ‘log`. If it is an `IO` or `StringIO`, only those lines currently under investigation will be kept in memory.
20 21 22 23 24 25 26 |
# File 'lib/tex_log_parser.rb', line 20 def initialize(log) super(log) # BROKEN_BY_LINEBREAKS # I'd prefer to have this stateless, but well (see below). @pushed_dummy = false end |