Recently I began using the excellent Python program LaTeX to WordPress (LaTeX2WP) by Luca Trevisan. Since some of my posts are written on computers where Python is not readily available, I put LaTeX2WP on PythonAnywhere as a web2py application. The downside is that settings are stuck at default (e.g., you get blackboard bold letters using \N, \Z, \R, \C, \Q). The upside is that the process simplifies to copy-paste-click-copy-paste.

The application is here: Web-based LaTeX2WP and it looks like this:

Although my modification of the source code is utterly trivial, according to GPL I should put it here. Namely, I merged latex2wp.py and latex2wpstyle.py into one file convert4.py, since web users can’t edit the style file anyway. Also replaced file input/output by a function call, which comes from web2py controller:

def index(): import convert4 form=FORM(TEXTAREA(_name='LaTeX', requires=IS_NOT_EMPTY()), BR(), INPUT(_type='submit', _value='Convert to WordPress')) produced = '' if form.accepts(request,session): produced = convert4.mainproc(form.vars.LaTeX) form2=FORM(TEXTAREA(_name='WP', value=produced)) return dict(form=form, form2=form2)

which in turn populates the html file:

Enter LaTeX code here {{=form}} Get WordPress code here {{=form2}}

To beef up this post, I include sample output. It is based on an old write-up of my discussions with Paul Gustafson during REU 2006 at Texas A&M University. Unfortunately, the project was never finished. I would still like to know if -equivalence of polynomials appeared in the literature; the definition looks natural enough.

Given two polynomials , write if there exists a differential operator such that . The relation is reflexive and transitive, but is not antisymmetric. If both and hold, we can say that and are *-equivalent*.

Definition.

A polynomial is-homogeneousif it is -equivalent to a homogeneous polynomial.

It turns out that it is easy to check the -homogeneity of by decomposing it into homogeneous parts

where is homogeneous of degree and .

Then use the following

Proposition 1.

The polynomial (1) is -homogeneous if and only if for .

*Proof:* Exercise.

For example, the polynomial is not -homogeneous since . On the other hand, is -homogeneous because . In particular, and are not -equivalent.

Proposition 1 also makes it clear that every polynomial in one variable is -homogeneous. For univariate polynomials -equivalence amounts to having the same degree.