Closed GoogleCodeExporter closed 8 years ago
The previous file I attached had some problems in IE due to trailing commas in
the
arrays; this version has that fixed.
Original comment by dpmc...@gmail.com
on 5 May 2010 at 2:13
Attachments:
Hi, thank you for this plugin! We are using it with great success at
http://tex.stackexchange.com -- however it seems there is at least one edge
condition with it on comments.
http://meta.tex.stackexchange.com/questions/872/text-immediate-following-double-
backslashes-is-highlighted-as-macro-inside-a-code/874#874
Original comment by wump...@gmail.com
on 30 Jan 2011 at 6:58
This issue mentioned in comment 2 seems to be fixable by changing the regex for
commands:
from
[PR.PR_KEYWORD, /^\\[^ \r\n{}\[\]=]+/],
to
[PR.PR_KEYWORD, /^\\(\\|[^ \r\n{}\[\]=]+)/],
I tested this with the code linked in comment 2 and it works well.
I attached the updated language file.
Original comment by martin.s...@gmail.com
on 30 Jan 2011 at 3:22
Attachments:
Still works for my purposes and on the original blog post I used this on.
Thanks for finding and fixing this small issue. Glad the plugin was of help to
you guys!
Original comment by dpmc...@gmail.com
on 30 Jan 2011 at 8:23
Would it be easier to change this to only match a backslash followed by letters
and @s. Everything else (usually) ends the control word. And one might
separately match control characters, i.e. a backslash followed by a single
non-letter.
Original comment by caram...@gmail.com
on 30 Jan 2011 at 8:43
Here the newly updated file: It now only allows letters, '@' and ':' (for
LaTeX3 code) and (as requested as a second reges) any one character (for '\\',
'\%', etc.) after a backslash.
Original comment by martin.s...@gmail.com
on 31 Jan 2011 at 10:34
Attachments:
And here an additional proposal with highlighted declarations (i.e. \def,
\newcommand and friends) as well '$' and '&' characters. Keywords are same as
the last one.
Original comment by martin.s...@gmail.com
on 31 Jan 2011 at 10:38
Attachments:
There are a couple of patches floating around.
I'm happy to fold into trunk whichever patch receives the consensus from
tex.stackexchange.com. Is there already a consensus or does someone want to
ask on meta.tex...?
Original comment by mikesamuel@gmail.com
on 31 Jan 2011 at 11:40
Here a small bugfix for the file proposed in comment 7.
The declaration rule needed a boundary marker at the end.
See
http://meta.tex.stackexchange.com/questions/872/text-immediate-following-double-
backslashes-is-highlighted-as-macro-inside-a-code/876#876 for the current
discussion on meta.tex.sx.
Original comment by martin.s...@gmail.com
on 1 Feb 2011 at 12:24
Attachments:
Here my final version. The LaTeX3 support was dropped because it can leads to
wrong result in normal LaTeX user code. The highlighting of declarations has
been dropped on demand.
I will open a public vote on tex.sx for this version.
Original comment by martin.s...@gmail.com
on 3 Feb 2011 at 3:02
Attachments:
The last version (10) seems to be the (silent) consensus on
meta.tex.stackexchange.com.
Original comment by caram...@gmail.com
on 10 Feb 2011 at 9:14
I added the latest version of the patch to trunk.
Martin, I added an apache license header to the top since that's the license
used elsewhere. If you're not okay with that, let me know and I'll delete that
file :
http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-tex.j
s
See dpmc...'s unittest at
http://google-code-prettify.googlecode.com/svn/trunk/tests/prettify_test_2.html#
latex
Original comment by mikesamuel@gmail.com
on 5 Mar 2011 at 4:22
Original issue reported on code.google.com by
dpmc...@gmail.com
on 4 May 2010 at 6:09