[texworks] Syntax highlighting puzzle
markyag at gmail.com
Tue Jan 19 08:12:33 CET 2016
If anyone knows how to do the following, I'd appreciate it. First,
some background, just in case it turns out I'm asking the wrong
question. I've asked here:
about how to get the \url command from the url package to accept \% as
a synonym for %, just like the \url command from the hyperref package
does, because use a bare % sign makes TeXworks syntax highlighting get
confused since it looks like a comment. I was told that \url is right
and my editor is wrong, so I went about trying to fix my editor.
It seems that the right approach here is editing the
syntax-patterns.txt file. But I can't figure out the right rules to
get the effect I want. First, I want \url to be blue just like other
commands. Second, I want the url itself to not turn red when it
contains % signs. I had hoped that some clever use of regex
assertions would do the trick, but I'm getting nowhere.
Is this possible? Does anyone else have this problem? What do other people do?
More information about the texworks