Port DruTex to Drupal 6
Steven Jones - February 18, 2008 - 15:19
| Project: | DruTeX |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
I guess DruTeX should get upgraded too.
I have no particular need to have this, but will spend some time on it when I get some. Help would be lovely if you need this too!

#1
Is there anything different about Drupal 6 that will require big rewriting of Drutex? Or is it the normal hook-chasing fodder?
Have you been able to look at it at all?
Cheers!
#2
Actually, looking in detail, not much has changed. So I'll make a D6 port when I get the chance. That will be the end of the current codebase then, and I'll rewrite version 2.0 from scratch after that.
#3
That's excellent thank you, I'm looking forward to it!
#4
In order to get it to work in Drupal 6 just modify the drutext.info and add the line:
core = "6.x"
Then edit the file drutex.module, remove the if(!$may_cache)-clause. Done.
An official package would be nice though.
#5
I would also be happy to help with this. I see its been about a month since this tarball was posted. Is the best way to contribute to submit patches based on this? Thanks.
#6
I've made corrections to the 6.x port in #4. With these changes drutex seems to be fully functional under Drupal 6.x ! Testing is needed to spot problems that I missed. I am running drutex on a production site now and will submit additional fixes and patches to improve it when I can. Here is a summary of some of the changes from the tarfile in #4.
* Fixed the code in hook_menu to bring it up to 6.x
* Fixed the watchdog, l() and url() arguments
* Added hook_filter_tips, so the user has a little more information about what sub_modules are active
* Added hook_link, so submodules can add links to the bottom of the page.
* Added subhook_pdf_link and subhook_latex_link to provide links to generate pdf and latex files
* Included a drutex.install file that adds hook_uninstall to properly get rid of the drutex variables in the variable table and clear the variable cache when the module is uninstalled
* Fixed some minor coding issues (though I am sure I missed a bunch...)
It would be great if we could have an official beta release of 6.x so more will be able to use it. Until then, I am attaching the updated tar file and a patch for the 6.x-1.3 tarfile in #4.
#7
#8
Sorry, I've been really busy, and not go around to porting Drutex to D6.
Thanks very much for the patch, do you think you could reroll for HEAD, and I'll get a dev version out, with a beta at the end of next week.
#9
Thanks. Here is the patch rolled against HEAD. I see now that there was new code in HEAD that was not in the tarfile in #4 (remote rendering) so this patch will do away with that code. I'll factor that back in and provide another patch as soon as I can get to it.
#10
Here is a new patch against head that includes fixes to the remote rendering code. I think I caught all the drupal 5.x - 6.x transition stuff, but I can't really test the remote rendering code to see if it is working. I know the menu item and admin form work, and doesn't break anything.
#11
I've added a Drupal 6 branch, I'll take a proper look at it over the week, aiming for a beta release in a week's time.
#12
Thanks. Note that the "package=" line should be deleted from the .info file as per http://drupal.org/node/231036 .
#13
subscribing
#14
subscribing
#15
Beta version posted.
#16
subscribing. Thanks for the port :)
#17
subscribing and looking forward to the D6 release.
#18
I checked out the DRUPAL-6--1-0-BETA1 tag and it loads up in my modules list, but I can't activate it because it's grayed out and says in bold, "This version is incompatible with the 6.12 version of Drupal core."
Reading this issue I see that drutext.info needs the line:
core = "6.x"
After adding that I can activate the module. When I test with "$x^2$" as per the documentation, I get an error "TeX Embedding failed!" Maybe that's a D6 issue; I don't know. In any case, it seems that a CVS tag of 6.x needs the line above in drutext.info to even test it.
#19
@turadg. The 6.x-1.x-dev version has the most up to date code, so I would recommend working from that. But you are right about the info file. Interesting that when you download the tarball, d.o. automatically fills in the missing information. I can see how you get the error working from a cvs checkout.
The tex embedding question is not really related to the original issue (Port DruTex to Drupal 6). I would be happy to try to help you out if you can start a new issue. (EDIT: Actually, before opening a new issue search the issue queue....You might want to look at #219979: TeX Embedding failed! to see if this might help)
@Steven Jones, attached is a patch which fixes the info file (hopefully for the last time!).
Since the D6 port of Drutex has been committed and released, this issue should probably be closed.
#20
@MGN, thanks for the info. And oops on changing the title of the issue. I mistook that field for the title of my comment, as in the forums.