Repository navigation
Colored output in Messages from User Commands #4386
Answered
by
Theodor-Lindberg
Theodor-Lindberg
asked this question in
Q&A
|
Hi! I'm developing a linter script for LaTeX and I invoke it as a user command in TeXstudio. The text "Process started:" is printed in green in the "Messages"-window, as expected, but the colours from the script's output are gone. I'm using TeXstudio 4.2.2 on Red Hat. The script itself is written in Python and colour to the output is added using the colorama package. Do you have any tips or insight to why the colours disappear? BR Theodor |
Answered by
Theodor-Lindberg
Mar 26, 2026
Replies: 2 comments 1 reply
|
txs just receives text from any binary, no escape sequences are taken into account (if they are even transferred) |
1 reply
|
I made some notes in PR #3873 which you might find helpfull |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Okay! Thank you for the quick reply. I figured out it's possible to use HTML-like colouring instead of ANSI.
By the way. While debugging this, I also noticed that colours are automatically added to any text matching certain patterns, overriding the original colours. For example, the string
'<span style="color:red">text<br></span>'is rendered red but'<span style="color:red">text with .tex<br></span>'is rendered green. I'm not familiar with the source code, but it's likely due to LogHighlighter::highlightBlock. This is not a problem for me at the moment, but something to be aware of.