SoC 2006: DruTeX

This group is dedicated to the development of DruTeX, a powerfull LaTeX module for Drupal.

Features include:

  • rendering of maths or arbitrary TeX via latex + ImageMagic / dvipng
  • support of classical LaTeX-math environments like $x^2$, \[ x^2 \]
  • some plain latex2html and html2latex facilities (no external program needed)
  • pdf generation of nodes (with LaTeX)
  • highly-configurable input formats
  • security-enhanced modes (to allow even anonymous users to write latex)
  • Drupal / LaTeX UTF-8 (utf8) support

Features in development (partly done):

  • latex math 2 MathML via some external application, e.g. blahtex
  • support to render gnuplot, eukleides, chemestry and so on
  • using mimetex instead of latex to render images

CVS repository, CVS messages

Project page, Issues, Documentation

How to use CCK custom fields on DruTeX

public
Rubio@drupal.org - Sun, 2009-03-29 10:42

Hi.

I just installed TeXlive and DruTeX on a VPS and they're working fine.

I even tweaked the DruTeX template to get the layout I need, but I can't figure out how to render to LaTeX custom fields created by CCK.

I need to render some text input by the user along with some headers and titles hardcoded in the template, son I need at least 15 fields to be filled by the user and render by DruTeX.

I don't know enough Drupal or PHP to fully understand the code, but I found some clues in the -- drutex.pdf.inc -- file, but I don't know how to tell drutex which CCK field to use.

Next Version

public
Steven Jones - Fri, 2008-04-18 18:00

Ideas for the next version of DruTeX at: http://drupal.org/node/248364

Next Version

public
Steven Jones - Fri, 2008-04-18 18:00

Ideas for the next version of DruTeX at: http://drupal.org/node/248364

Math server

public
bobca - Sun, 2008-03-30 12:36

Hello,
I'm relatively new to Drupal which I installed with ease. Now I'm trying to render mathematics within my pages, so I installed DruteX. My server can't handle latex requests since I can't install software onto it (except all kind of php of course).
I can access a math server, which transforms gracefully math formulae into images, e.g.
http://math.spip.org/txt.php?\int_0^1x^2dx
gives the expected result (a PNG image, of course).

How can I use that remote server ?

Math server

public
bobca - Sun, 2008-03-30 12:36

Hello,
I'm relatively new to Drupal which I installed with ease. Now I'm trying to render mathematics within my pages, so I installed DruteX. My server can't handle latex requests since I can't install software onto it (except all kind of php of course).
I can access a math server, which transforms gracefully math formulae into images, e.g.
http://math.spip.org/txt.php?\int_0^1x^2dx
gives the expected result (a PNG image, of course).

How can I use that remote server ?

tth

markfoodyburton@drupal.org's picture
public
markfoodyburton... - Fri, 2008-01-11 21:56

I've just integrated tth into a filter, simply because somebody wanted to throw a load of latex onto my site.
It worked - it took 1/2 an hour to do.

I dont think it's exactly tryng to solve the same problem as drutex, I'm not sure, but it seems remarkably close, and would probably work for most people?

tth can be found here: http://hutchinson.belmont.ma.us/tth/

I'm not especially fixated on it, I'd appreciate hearing other peoples opinions.

If anybody wants the module, it's fairly trivial, I could check it in if it helps....


tth

markfoodyburton@drupal.org's picture
public
markfoodyburton... - Fri, 2008-01-11 21:56

I've just integrated tth into a filter, simply because somebody wanted to throw a load of latex onto my site.
It worked - it took 1/2 an hour to do.

I dont think it's exactly tryng to solve the same problem as drutex, I'm not sure, but it seems remarkably close, and would probably work for most people?

tth can be found here: http://hutchinson.belmont.ma.us/tth/

I'm not especially fixated on it, I'd appreciate hearing other peoples opinions.

If anybody wants the module, it's fairly trivial, I could check it in if it helps....


Issues on the PDF and TeX generation

public
franqui@drupal.org - Fri, 2007-11-09 17:52

I found two disturbing issues when creating a PDF or a Tex file from a node.

First, the PDF is not updated, once it is created the first time. The reason is this test located in the drutex_node2pdf_wrapper function:

  if (!is_file("$pdf_dir/{$node->nid}.pdf")) {
    drutex_node2pdf($nid);
  }

I just commented the test in my site. PDF should be generated each time it is requested, as node might have been updated in the meanwhile.

Issues on the PDF and TeX generation

public
franqui@drupal.org - Fri, 2007-11-09 17:52

I found two disturbing issues when creating a PDF or a Tex file from a node.

First, the PDF is not updated, once it is created the first time. The reason is this test located in the drutex_node2pdf_wrapper function:

  if (!is_file("$pdf_dir/{$node->nid}.pdf")) {
    drutex_node2pdf($nid);
  }

I just commented the test in my site. PDF should be generated each time it is requested, as node might have been updated in the meanwhile.

PDF Generation error

public
franqui@drupal.org - Fri, 2007-11-09 15:48

Hi folks:

I've been playing around with the module, and I found an error when converting html tags to latex commands (more precisely, when converting the tag <em> to the \emph{} command).

For some reason I got a "\" before the opening curly bracket, so the command - \emph{ whatever } - was not properly recongized.

PDF Generation error

public
franqui@drupal.org - Fri, 2007-11-09 15:48

Hi folks:

I've been playing around with the module, and I found an error when converting html tags to latex commands (more precisely, when converting the tag <em> to the \emph{} command).

For some reason I got a "\" before the opening curly bracket, so the command - \emph{ whatever } - was not properly recongized.

latexgen

markfoodyburton@drupal.org's picture
public
markfoodyburton... - Tue, 2007-10-30 13:26

Hi, just posted a tiny module which "works for me" - it's not pretty and its not cleaver, but it might be helpful to others who use latex. It simply allows you to put some latex code, with embedded php code within it, onto a content type - and then gives you the ability to download the resulting PDF. The module itself is the trivial part - getting your php code and latex to work just the way you want it - thats the real problem. I'd guess most people would hack the module about a bit too... Anyway, it maybe helpful to some people.


latexgen

markfoodyburton@drupal.org's picture
public
markfoodyburton... - Tue, 2007-10-30 13:26

Hi, just posted a tiny module which "works for me" - it's not pretty and its not cleaver, but it might be helpful to others who use latex. It simply allows you to put some latex code, with embedded php code within it, onto a content type - and then gives you the ability to download the resulting PDF. The module itself is the trivial part - getting your php code and latex to work just the way you want it - thats the real problem. I'd guess most people would hack the module about a bit too... Anyway, it maybe helpful to some people.


Drutex 5.0

public
dagray207 - Tue, 2007-01-16 23:05

Hey everyone -

I just got my own local copy of drutex working for drupal 5.0 (I still need to get an install of latex for my server; its a hosted server - I'm looking into server farms, but haven't been able to find anything reasonable yet)

I just installed drupal for the first time, so this was sort of a get oriented with the system project. I expected it to take a long time.... it took 5 minutes! (granted, I still have to install latex on my server - but it appears drutex is working fine)

Drutex 5.0

public
dagray207 - Tue, 2007-01-16 23:05

Hey everyone -

I just got my own local copy of drutex working for drupal 5.0 (I still need to get an install of latex for my server; its a hosted server - I'm looking into server farms, but haven't been able to find anything reasonable yet)

I just installed drupal for the first time, so this was sort of a get oriented with the system project. I expected it to take a long time.... it took 5 minutes! (granted, I still have to install latex on my server - but it appears drutex is working fine)

<equations> vs. \begin{eqnarray}

public
grover1729 - Mon, 2006-12-11 19:48

A friend and I are starting a Drupal for mathematicians (who know LaTeX, but little else). Anyway, I am wondering if there is a good reason why Drutex uses <equations>...</equations> instead of just supporting the \begin{eqnarray}...\end{eqnarray} environment from LaTeX. At least for my target audience, the latter would be preferable. Thanks in advance for any comments/advice.

Matt

<equations> vs. \begin{eqnarray}

public
grover1729 - Mon, 2006-12-11 19:48

A friend and I are starting a Drupal for mathematicians (who know LaTeX, but little else). Anyway, I am wondering if there is a good reason why Drutex uses <equations>...</equations> instead of just supporting the \begin{eqnarray}...\end{eqnarray} environment from LaTeX. At least for my target audience, the latter would be preferable. Thanks in advance for any comments/advice.

Matt

Documentation

dfg@drupal.org's picture
public
dfg@drupal.org - Sun, 2006-08-20 20:30

D r u T e X

1. Installation
2. Configuration
3. Usage
4. Additional modules
5. Developer notes
6. Author

Documentation

dfg@drupal.org's picture
public
dfg@drupal.org - Sun, 2006-08-20 20:30

D r u T e X

1. Installation
2. Configuration
3. Usage
4. Additional modules
5. Developer notes
6. Author

Installation Instructions

dfg@drupal.org's picture
public
dfg@drupal.org - Sat, 2006-08-19 08:08

1) Download the DruTeX module from the Drupal website and unpack it to the modules directory. You now have a directory modules/drutex.

2) Go to the module admin section and enable "drutex".

3) Go to the input-filters admin section and create a new input format. You can choose an arbitrary name, but "DruTeX" would make sense. When you create a new format, you can select an input filter from a list: Just choose DruTeX.

4) Go again to the input-filters admin section, and select "configure" for the newly added input format. Click on the "configure" tab, and you are able to adjust many settings of DruTeX.


Installation Instructions

dfg@drupal.org's picture
public
dfg@drupal.org - Sat, 2006-08-19 08:08

1) Download the DruTeX module from the Drupal website and unpack it to the modules directory. You now have a directory modules/drutex.

2) Go to the module admin section and enable "drutex".

3) Go to the input-filters admin section and create a new input format. You can choose an arbitrary name, but "DruTeX" would make sense. When you create a new format, you can select an input filter from a list: Just choose DruTeX.

4) Go again to the input-filters admin section, and select "configure" for the newly added input format. Click on the "configure" tab, and you are able to adjust many settings of DruTeX.


Drupal key to our non-profit progress

public
marknewlyn@drup... - Wed, 2006-08-16 00:34

Hi Everyone

Keeping this short is tough (and off to a bad start ;) - at home (South Africa) there is huge social disparity which is perpetuated by only the well-off having access to resources that could potentially break the cycle. We are focused on education. Many students in poorer schools (>50%) do not even have sufficient textbooks. Enter our project - a note: without publishers', editors' and authors' royalties a hard cover 250 page books costs less than ZAR20 (<$2.5) to print:

<

blockquote>
FHSST (Free High School Science Texts) is a project that aims to provide free science and mathematics textbooks for Grades 10 to 12 science learners in South Africa.

Drupal key to our non-profit progress

public
marknewlyn@drup... - Wed, 2006-08-16 00:34

Hi Everyone

Keeping this short is tough (and off to a bad start ;) - at home (South Africa) there is huge social disparity which is perpetuated by only the well-off having access to resources that could potentially break the cycle. We are focused on education. Many students in poorer schools (>50%) do not even have sufficient textbooks. Enter our project - a note: without publishers', editors' and authors' royalties a hard cover 250 page books costs less than ZAR20 (<$2.5) to print:

<

blockquote>
FHSST (Free High School Science Texts) is a project that aims to provide free science and mathematics textbooks for Grades 10 to 12 science learners in South Africa.

Hello, I want to contribute to drutex

public
claus2080@drupal.org - Mon, 2006-07-31 16:50

Hi! I'd like to start contributing to drutex. I've installed it on my server and guess what? It didn't work. So I'm asking myself: Why doesn't it work? I've added a couple of useful debugging features to my own drutex_render.inc, one which is related to an issue posted a while ago, stating that the message TeX Embedding failed! was not enough (http://drupal.org/node/71218). The other one was trying to access the latex error log. Both were quite simple.

Hello, I want to contribute to drutex

public
claus2080@drupal.org - Mon, 2006-07-31 16:50

Hi! I'd like to start contributing to drutex. I've installed it on my server and guess what? It didn't work. So I'm asking myself: Why doesn't it work? I've added a couple of useful debugging features to my own drutex_render.inc, one which is related to an issue posted a while ago, stating that the message TeX Embedding failed! was not enough (http://drupal.org/node/71218). The other one was trying to access the latex error log. Both were quite simple.

Linked references

njivy@drupal.org's picture
public
njivy@drupal.org - Tue, 2006-07-11 01:21

In items 4.2 and 4.3 of our technical specification, we talked about links between \ref{equation-id} and <equation id="equation-id"></equation>. What plans do we have to include this functionality in DruTeX?


Linked references

njivy@drupal.org's picture
public
njivy@drupal.org - Tue, 2006-07-11 01:21

In items 4.2 and 4.3 of our technical specification, we talked about links between \ref{equation-id} and <equation id="equation-id"></equation>. What plans do we have to include this functionality in DruTeX?


Mimetex.cgi hack

dwees's picture
public
dwees - Sat, 2006-07-01 10:50

I've created a hack for converting Drutex from using LateX to render the pictures to using Mimetex.cgi to render them. The image quality isn't quite as good, but it works. The hack is currently in the really ugly stage where a lot of the Drutex stuff probably doesn't work (like multi-line equations), but I will test this stuff out, and see if I can modify the code to support this. I'm a real beginner in PhP so I'm not able to answer any fancy questions about it. Also, please note that you will want to change the URL to the Mimetex.cgi, and that Mimetex.cgi needs to be installed into the CGI-BIN directory of your webhost.


Mimetex.cgi hack

dwees's picture
public
dwees - Sat, 2006-07-01 10:50

I've created a hack for converting Drutex from using LateX to render the pictures to using Mimetex.cgi to render them. The image quality isn't quite as good, but it works. The hack is currently in the really ugly stage where a lot of the Drutex stuff probably doesn't work (like multi-line equations), but I will test this stuff out, and see if I can modify the code to support this. I'm a real beginner in PhP so I'm not able to answer any fancy questions about it. Also, please note that you will want to change the URL to the Mimetex.cgi, and that Mimetex.cgi needs to be installed into the CGI-BIN directory of your webhost.


Any news here?

robertDouglass's picture
public
robertDouglass - Wed, 2006-06-28 12:32

It would be nice to get an update on progress.


Any news here?

robertDouglass's picture
public
robertDouglass - Wed, 2006-06-28 12:32

It would be nice to get an update on progress.


Technical specification

njivy@drupal.org's picture
public
njivy@drupal.org - Mon, 2006-06-12 03:10

Our technical specification is available through Writeboard.com. (Ask for the password.) We finished the technical spec on May 30 and excised one line on June 6, 2006.


Technical specification

njivy@drupal.org's picture
public
njivy@drupal.org - Mon, 2006-06-12 03:10

Our technical specification is available through Writeboard.com. (Ask for the password.) We finished the technical spec on May 30 and excised one line on June 6, 2006.


Syndicate content