Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions LaTeXTools Log.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,12 @@ contexts:
log-message-end:
- match: \.$
pop: 1
# opening block
- match: ^(?=\([^)]*[./][^)]*$)
pop: 1
# register definition
- match: ^(?=\\[\w@]+\s*=)
pop: 1

log-paragraph-end:
# empty line
Expand Down
24 changes: 24 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,30 @@ The second exception has to do with file and path names. In order to accommodate

Finally, I have done my best to accommodate non-ASCII characters in logs. I cannot promise that everything works, but I'd like to know if you see issues with this.

### Missing errors with the Traditional Builder

If a failed build reports “No errors” even though the `.log` contains an
undefined-command error, include a minimal document and the log when reporting
the problem. Informational messages without a final period, such as those
emitted by `tufte-book` with its `debug` option, can expose file-tracking bugs in
older versions of the log syntax.

As a workaround, enable detailed output in LaTeXTools user settings:

```json
{
"builder_settings": {
"display_log": true
}
}
```

`display_log` belongs inside `builder_settings`, not at the top level. For
`latexmk`, this replaces `-silent` with `-verbose`. The default `latexmk`
configuration adds `-interaction=batchmode` in silent mode; verbose mode keeps
LaTeXTools' `-interaction=nonstopmode`. Make a small source edit and build again
to regenerate the log, since `latexmk` can retain a previous failed build's log.

## Other issues

While we have tried to provide some guidance in this section on commonly-encountered issues, please feel free to [open a new issue](https://github.com/SublimeText/LaTeXTools/issues/new) if you have come across an issue with LaTeXTools. However, please [search for existing issue](https://github.com/SublimeText/LaTeXTools/issues/?q=is%3Aopen) before opening a new one, as we may have already covered it somewhere.
38 changes: 38 additions & 0 deletions tests/syntax/syntax_test_latex.log
Original file line number Diff line number Diff line change
Expand Up @@ -1219,3 +1219,41 @@ d comment continued on next line (book)
)
# <- meta.block.log punctuation.section.block.end.log
#^ - meta.block

# -----------------------------------------------------------------------------
# Unterminated info messages followed by engine output
# -----------------------------------------------------------------------------

(./info-register.tex
Package demo Info: Allocating a register
\democount=\count284
# <- meta.block.log - meta.info
(./backend.def
# <- meta.block.log meta.block.log punctuation.section.block.begin.log - meta.info
\backendcount=\count285
)
# <- meta.block.log meta.block.log punctuation.section.block.end.log
! Undefined control sequence.
# <- meta.block.log meta.exception.log markup.error.log
l.5 \doesnotexist

)
# <- meta.block.log punctuation.section.block.end.log
#^ - meta.block

(./info-file.tex
Class demo Info: Loading a class
(demo) This is a continuation without a final period
# <- meta.block.log meta.info.log meta.parens.log
(./demo.cls
# <- meta.block.log meta.block.log punctuation.section.block.begin.log
Package demo Warning: A warning on input line 4.
# <- meta.block.log meta.block.log meta.warning.log
)
! Undefined control sequence.
# <- meta.block.log meta.exception.log markup.error.log
l.8 \doesnotexist

)
# <- meta.block.log punctuation.section.block.end.log
#^ - meta.block
48 changes: 48 additions & 0 deletions tests/test_log_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,54 @@ def test_malformed_exceptions_only_titles(self):
expected_badboxes=[],
)

def test_info_before_register_allocation(self):
self.assert_tex_log_items(
R"""
(./main.tex
Package demo Info: Allocating a register
\democount=\count284
(./backend.def
\backendcount=\count285
)
! Undefined control sequence.
l.5 \doesnotexist

)
""",
expected_errors=[
R"main.tex:5: Undefined control sequence near \doesnotexist",
],
expected_warnings=[],
expected_badboxes=[],
)

def test_info_before_file_block(self):
self.assert_tex_log_items(
R"""
(./main.tex
Class demo Info: Loading a class
(demo) This is a continuation without a final period
(./demo.cls
Package demo Warning: A warning on input line 4.
! Undefined control sequence.
l.5 \innerundefined

)
! Undefined control sequence.
l.8 \outerundefined

)
""",
expected_errors=[
R"demo.cls:5: Undefined control sequence near \innerundefined",
R"main.tex:8: Undefined control sequence near \outerundefined",
],
expected_warnings=[
"demo.cls:4: A warning on input line 4",
],
expected_badboxes=[],
)

def test_nested_errors(self):
self.assert_tex_log_items(
R"""
Expand Down
Loading