[texworks] texworks
Jonathan Kew
jfkthame at googlemail.com
Sun Jun 6 15:44:51 CEST 2010
I don't think the issue was to do with the *output*, which will be fine.
The problem mentioned was the *highlighting* (in the source window), which will color the remainder of the line as if it were a comment, even though it's not.
This is a limitation of the highlighting system, which uses simple pattern rules to identify elements in the text; it does not really "understand" the (La)TeX code, and so it's possible for it to be misled.
Because of the flexibility of TeX input syntax, it's very difficult to come up with a 100%-reliable syntax highlighting method -- for example, \catcode changes can completely alter the meanings of all the "special" characters like \, {, }, #, %, $, etc. Short of actually running some version of TeX's input scanner and macro processor, it's impossible for an editor to really know what's going on.
(Of course it may be possible to make the process somewhat smarter than it is at present, but I think there will always be cases that don't work entirely as expected.)
JK
On 5 Jun 2010, at 23:26, Jim Sheng wrote:
> It doesn't happen to me. You need to put some text verbatim inside a delimiter.
>
> In your example, "\verb+%a+ some text", the char + is the delimiter, out put is "% some text".
>
>
>
> -------------------------------------------
> 达则兼济天下,雅能独善其身。
> http://www.dayabook.com/
>
>
> On 5 June 2010 21:29, Mario Cupelli <mariocupelli at web.de> wrote:
> Hello texworks team,
>
> I am working with texworks and it is really great, but currently I found
> a bug, that is quite annoying.
>
> Example:
> \verb+%a+ some text
>
> If the verb content includes a comment character (without escaping it),
> then the rest of the text will be highlighted as comment.
>
> Regards,
>
> Mario
>
>
More information about the texworks
mailing list