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!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Justyn-1’s picture

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!

Steven Jones’s picture

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.

Justyn-1’s picture

That's excellent thank you, I'm looking forward to it!

jseffel’s picture

FileSize
383.18 KB

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.

MGN’s picture

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.

MGN’s picture

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.

MGN’s picture

Title: Upgrade to Drupal 6 » Port DruTex to Drupal 6
Status: Active » Needs review
Steven Jones’s picture

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.

MGN’s picture

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.

MGN’s picture

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.

Steven Jones’s picture

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.

MGN’s picture

Thanks. Note that the "package=" line should be deleted from the .info file as per http://drupal.org/node/231036 .

no2e’s picture

subscribing

scott859’s picture

subscribing

Steven Jones’s picture

Version: master » 6.x-1.x-dev

Beta version posted.

nquocbao’s picture

subscribing. Thanks for the port :)

turadg’s picture

subscribing and looking forward to the D6 release.

turadg’s picture

Title: Port DruTex to Drupal 6 » D6 branch missing info
Version: 6.x-1.x-dev » 6.x-1.0-beta1

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.

MGN’s picture

Title: D6 branch missing info » Port DruTex to Drupal 6
Version: 6.x-1.0-beta1 » 6.x-1.x-dev
FileSize
411 bytes

@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.

turadg’s picture

@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.