Bug 248930

Summary: Syntax file for latex logfiles
Product: [Frameworks and Libraries] frameworks-syntax-highlighting Reporter: Thomas Braun <thomas.braun>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: jonathan.poelen, walter.von.entferndt
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: syntax file for latex log file

Description Thomas Braun 2010-08-24 21:14:42 UTC
Created attachment 50901 [details]
syntax file for latex log file

Version:           unspecified (using KDE 1.2) 
OS:                Linux

Attached is a syntax file for the log files created by latex/pdflatex.
This helps in navigating in the log file.

Reproducible: Didn't try




OS: Linux (i686) release 2.6.26-2-686
Compiler: Target: i486-linux-gnu
Comment 1 Jonathan Poelen 2025-07-08 23:41:12 UTC
Hi, I started looking and made some changes in the file (notably to support windows paths), 2 questions:

- Do you agree to license the file under MIT or do you really want to keep LGPL?
- The regex for Keyword is "\\[a-zA-Z@]+", but based on example files¹, there may be digits after a keyword, is it normal that 0-9 is not present? I also see \l__kernel_color_stack_int=\count185, shouldn't `_` be added to the regex? I could see this regex "\\[_a-zA-Z@][_a-zA-Z0-9@]*"

¹ https://github.com/search?q=This+is+pdfTeX%2C+path%3Alog&type=code

2 years ago, I added logfile.xml and logfile-advanced.xml, both of which use the .log extension. Their priority is very low (-10 and -11), so there's little chance of them conflicting with user syntax. I'm thinking of adding 2 intermediaries that will check that the first line contains "pdfTeX," and redirect to latex-logfile or logfile/logfile-advanced depending on the result.

I imagine a latex file always starts with "This is pdfTeX, Version bla bla"?
Comment 2 Thomas Braun 2025-07-09 10:38:03 UTC
Am Dienstag, dem 08.07.2025 um 23:41 +0000 schrieb Jonathan Poelen:
> https://bugs.kde.org/show_bug.cgi?id=248930
> 
> --- Comment #1 from Jonathan Poelen <jonathan.poelen@gmail.com> ---
> Hi, I started looking and made some changes in the file (notably to
> support
> windows paths), 2 questions:
> 
> - Do you agree to license the file under MIT or do you really want to
> keep
> LGPL?

Feel free to change the license as you see fit.

> - The regex for Keyword is "\\[a-zA-Z@]+", but based on example
> files¹, there
> may be digits after a keyword, is it normal that 0-9 is not present?
> I also see
> \l__kernel_color_stack_int=\count185, shouldn't `_` be added to the
> regex? I
> could see this regex "\\[_a-zA-Z@][_a-zA-Z0-9@]*"
> 
> ¹ https://github.com/search?q=This+is+pdfTeX%2C+path%3Alog&type=code
>
> 
> 2 years ago, I added logfile.xml and logfile-advanced.xml, both of
> which use
> the .log extension. Their priority is very low (-10 and -11), so
> there's little
> chance of them conflicting with user syntax. I'm thinking of adding 2
> intermediaries that will check that the first line contains "pdfTeX,"
> and
> redirect to latex-logfile or logfile/logfile-advanced depending on
> the result.
> 
> I imagine a latex file always starts with "This is pdfTeX, Version
> bla bla"?

This was 15 years ago, and I'm not using kile anymore. So I can't
comment here.
Comment 3 Bug Janitor Service 2025-07-10 00:10:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/717
Comment 4 Christoph Cullmann 2025-07-13 13:40:42 UTC
Git commit afc926451962039f3ce4c5b95b6ee2911725faab by Christoph Cullmann, on behalf of Jonathan Poelen.
Committed on 13/07/2025 at 13:28.
Pushed by cullmann into branch 'master'.

add LaTeX Log File syntax

A  +24   -0    autotests/folding/highlight.latexlog.fold
A  +31   -0    autotests/html/highlight.latexlog.dark.html
A  +31   -0    autotests/html/highlight.latexlog.html
A  +24   -0    autotests/input/highlight.latexlog
A  +1    -0    autotests/input/highlight.latexlog.syntax
A  +24   -0    autotests/reference/highlight.latexlog.ref
A  +65   -0    data/syntax/latex-logfile.xml

https://invent.kde.org/frameworks/syntax-highlighting/-/commit/afc926451962039f3ce4c5b95b6ee2911725faab