# WordPress.org

## WP LaTeX Size option of inline code not working (3 posts)

1. stefga
Member
Posted 1 year ago #

I tried to set a size for my Latex formula, but it did not work as expected:

(#1) Not working: $latex e^{\i \pi}&s=4$
(#2) Working: $latex e^{\i \pi}& amp;s=4$
(without the space)

I changed in wp-latex.php the regular expression so it includes
the non-escape ampersand:

wp-latex,php line 118:
preg_match( '/.+((?:& #038;|& amp;|&)s=(-?[0-4])).*/i', ...<br />
Now, both versions work.

Do I miss an option that makes #1 work out of the box? If not,
would you change the regular expression for the next WP Latex relase,

Kind Regards
Stefan

Member
Plugin Author

Posted 1 year ago #

I believe it fixes the encoding issues as well as some image alignment issues.

3. stefga
Member
Posted 1 year ago #

Hi Michael!

Thank you! The resizing works perfectly now!

Kind Regards
Stefan

This topic has been closed to new replies.