Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author advanpix

    (@advanpix)

    Here is what should be changed in wp-quicklatex.php file for $latex … $ syntax support:

    The regexp in line 1815:

    '/(!*\$(.*?)\$)/s'

    should be replaced with:

    '/(!*\$(latex)*(.*?)\$)/s'

    Could you please try it? If everything is Ok – I will commit this to QL main repository.

    Just for information, QL displays meaningful error messages if “Debug mode” is on. Otherwise it is in permissive mode, correcting mistakes automatically (by default).

    Thread Starter atpresent

    (@atpresent)

    Hey Pavel, thank you for this super quick response! I tried your code but had to slightly modify it. This is what worked:

    ‘/(!*\$latex*(.*?)\$)/s’

    and this is how the whole line looks now:

    $content = preg_replace_callback(‘/(!*\$latex*(.*?)\$)/s’,’do_quicklatex_inline_formulas’, $content);

    I’ll keep you posted if there are any issues.

    Thanks a lot!

    Plugin Author advanpix

    (@advanpix)

    Thank you for feedback!
    Unfortunately this regexp works only for $latex…$ syntax.

    Could you please try new one:

    '/(!*\$(?:latex)?(.*?)\$)/s'

    I am sure now it is compatible with both: WP LaTeX and QL.

    Thank you.

    Thread Starter atpresent

    (@atpresent)

    Seems to work! I’ll let you know if something comes up.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How can I add support for $latex $’ is closed to new replies.