7

I was trying to change my TeXworks editor's background to black, some suggested it is possible to edit this file :

~/.TexWorks/configuration/syntax-pattern.txt

but I could not locate this .txt file.

Thank you for your help!

AboAmmar
  • 46,352
  • 4
  • 58
  • 127
Xiao
  • 175
  • 1
    That path is a Unix(-like) path, and unlikely to exist on Windows. Can't you just search for syntax-pattern.txt? – jon Jul 22 '15 at 02:44
  • @jon I tried the search at Windows start, but no result turned up. – Xiao Jul 22 '15 at 02:50
  • Looks like the manual is available on Google Drive, the link to which is available here. I use neither Windows nor TeXworks, so I need to stop here. Good luck! – jon Jul 22 '15 at 03:07
  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Symbol 1 Jul 22 '15 at 03:13

2 Answers2

7

In Windows, with MiKTeX 2.9 distribution, you can get the required file on the following path:

"C:\Users\Username\AppData\Local\MiKTeX\2.9\TeXworks\0.4\configuration\syntax-patterns.txt"

Of course Username is your Windows user name.

Note also that this file is not for background colors but for text syntax highlighting. You can find more details in this link on how to customize colors and syntax highlighting.

AboAmmar
  • 46,352
  • 4
  • 58
  • 127
  • 1
    For others: note that the colors are described in words (Google css colors in order to get a list of what's available). The code after the color (such as \\(?:[A-Za-z@]+|.)) is to do with which characters escape the color mode (I think). – ahorn Mar 27 '19 at 07:47
1

Whilst a different Windows version and TeXworks installer, I found the syntax-pattern.txt file on Windows 10 when installed with TeX Live 2021 in this directory:

C:\Users\[Your user]\.texlive2021\texmf-config\texworks\configuration\

enter image description here

Came across this question but the accepted answer was not helpful for TeX Live hence this answer.

JamesT
  • 3,169