DruTeX seems to be working. Embedding LaTeX with $x^2$ works fine. But when I type x^2 it doesn't work. The output has the angle-bracketed tex's in regular text, and no PNG is created. (This is on the same page as some working $-embedded TeX.) I suspect it's some combination of TinyMCE, HTML filtering, and DruTeX.
I don't know if this is relevant, but:
* I clicked on Administer and Input Formats. I then click configure on the DruTeX line.
* On the DruTeX page's View tab, in the Filters section, only DruTeX is checked. HTML filter is not checked.
* On the Configure tab, Security restrictions is not checked.
I didn't see info on this in the documentation or the existing DruTeX issues.
Any thoughts?
Thanks,
-Amir Karger
Comments
Comment #1
steven jones commentedis
<tex>x^2</tex>not working? orx^2Comment #2
amirkarger commentedArgh!
I didn't think ahead that the editor would throw away my tex boxes. What's not working is when I surround a LaTeX expression with [tex]x^2[\tex], except using angle brackets instead of brackets.
-Amir
Comment #3
amirkarger commentedComment #4
amirkarger commentedMore info:
TinyMCE definitely has something to do with it. If I "disable rich text" in tinyMCE, and then put in an equation inside an equation .. /equation tag, then hit Preview, then I can see the equation looking like a real equation. However, you know how preview shows you a preview but then re-displays the edit box? Well, since TinyMCE is my default editor, it displays the page text in the edit box WITHOUT the equation tag! (The text inside the equation stays there.)
So, do I need to always turn off rich text in TinyMCE? That would be a bummer. Is there some way to tell TinyMCE to ignore certain tags?
Help!
Comment #5
steven jones commentedI don't think TinyMCE can be made to play nice, because it will always try to change the code. Unless someone else knows otherwise?
Comment #6
amirkarger commentedmodules/tinymce/README.txt mentions an extended_valid_elements attribute which, if I'm reading correctly, allows you to pass certain tags through tinymce without getting quoted. (This is how tinymce lets you build ul or nl lists, for example.) The README says, for example:
$init['extended_valid_elements'] = array('a[href|target|name|title|onclick]');
plugin_reg.php has a bunch of statements like:
$plugins['advhr']['extended_valid_elements'] = array('hr[class|width|size|noshade]');
Docs here: http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/extended_valid...
I didn't trace the code, and I don't really know php, but I assume somewhere or other all of those hashes get mushed together into the main $init['extended_valid_elements']. Perhaps a non-huge amount of work could yield another cange to extended_valid_elements that would fix this.
On a more general note, I guess I'm surprised this hasn't been mentioned before. Isn't tinymce the standard default editor for Drupal?
Comment #7
steven jones commentedWell, if you type
<tex>x^2</tex>then TinyMCE will think that's what you want the output to be. You don't type<strong>Bold Text</strong>do you? So while you can say to TinyMCE 'keep my<tex>'s in the output, you have to get them in somewhere. It's for this reason I don't use it.Comment #8
steven jones commentedMore of an issue with WYSIWYG than drutex.