WordPress.org

Ready to get started?Download WordPress

Forums

Crayon Syntax Highlighter
TeX support (5 posts)

  1. cyChop
    Member
    Posted 2 years ago #

    Hi! I wrote a basic version for TeX support in Crayon: http://blog.keyboardplaying.org/2012/06/08/syntax-highlighting-latex/

    There are some glitches, but I am overbooked and cannot look deeper into it right now. Anyway, feel free to use it as a base for including TeX support for Crayon.

    Thanks for your plugin, it works wonderfully! :)

    http://wordpress.org/extend/plugins/crayon-syntax-highlighter/

  2. akarmenia
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks a lot, I'll add it into the next version tomorrow!

  3. cyChop
    Member
    Posted 2 years ago #

    Realized there is a mistake on the display of my site. The correct regexes should be the following:

    ...
    COMMENT (?<!\\)%.*?$

    # Make math formulaes appear as Strings
    MATH:STRING ((?<!\\)\$\$.*?(?<!\\)\$\$)|((?<!\\)\$.*?(?<!\\)\$)|((?<!\\)\\\[.*?(?<!\\)\\\])

    STATEMENT (\\[\w]+)|(\\['`^"~=.$vuH][\w]?)

    SYMBOL (?<!\\)(?default)

    I corrected my blog post, but somehow, HTML comment marks keep popping up, changing the first '<!' into '<!--' and adding a '-->' at the end of block. Does this come from Crayon, as a failsafe for incorrect syntaxes?

    Thanks for the inclusion into the plugin!

  4. akarmenia
    Member
    Plugin Author

    Posted 2 years ago #

    Works for me here:

    http://aksandbox.webege.com/?p=92

    It might be TinyMCE or perhaps a WordPress setting. Try using the Tag Editor while in HTML mode?

  5. cyChop
    Member
    Posted 2 years ago #

    Well I don't know. I got some weird things even in HTML mode. Got through it by replacing < with <.

    Thanks anyway! :)

    (I noticed the \r\n are now visible at the end of commented lines in TeX mode, I'll try to adapt the regex when I have time and will let you know if I can make better)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic