# LaTeX2WP Update

I have posted a new version of LaTeX2WP, a program that converts a LaTeX file into a format that is ready to be copied into WordPress.

The new version fixes some bugs and has some new features:

• Thanks to code contributed by Radu Grigore, it is now possible to nest bold inside italic, and there is a better overall support for font styles. (Which is also easier to customize.)
• eqnarray* is now supported.
• LaTeX commands are correctly “tokenized” before certain macros are applied. For example, LaTeX2WP recognizes the macro \P for \mathop{\mathbb P}. In the previous version, however, the above transformation would also be applied to the initial \P in \Phi. Thanks to Terry Tao and “ccarminat” for noticing this bug.
• Commands such as \\$ and \% now work in math mode. (\& does not work, but this seems to be a WordPress problem.) Thanks to Atri Rudra for noticing this bug.
• Quotation marks are applied to the URL in \href and \hrefnospan. The lack of such quotation marks sometimes creates problems with \hrefnosnap.
Advertisements

## 13 thoughts on “LaTeX2WP Update”

1. Could the \& problem be due to confusion with the “&” needed by HTML?

2. I tried all combinations: leaving \& as it is, replacing it with \&amp;, and replacing it with just &amp;, and none works.

3. Hi,

Thanks a lot for this! I’ve been using it, and it really simplifies things. Two questions: 1. Can we use macros? (As in: Define a new theorem environment or make global definitions? The usual latex way does not work, maybe it is too much to ask for now.)
2. Can we modify the counters, so for example, the first theorem in a post is theorem 7 rather than 1?
Also, there seems to be a problem if I want to have remarks in roman font ({\rm …} does not seem to work).

4. You can define new theorem environments and new macros by editing the latex2wpstyle.py file. There are some instructions on how to do so in readme.txt and in latex2wpstyle.py. If you encounter difficulties, please post a comment on the Using LaTeX2WP page.

You can also change the style of theorem-like environments so they are displayed in roman instead of italic, but (in the present version) you cannot do it selectively for only one environment. {\rm …} and \setcounter are not recognized.

You could modify the counters by editing latex2wp.py (after, I suggest, saving a back-up copy). For example, if you want the counter for theorems to start at 7, you should add the line

 count[T["theorem"]] = 6

before the line ref = {}

5. Great tool, very helpful and I hope the \cite-command including literature will be supported too.

But now my stupid question: Where do I have to add a comment, so that
\S16 will be translated into §16 (\S = § in LaTeX)?

Thanks

Ulrich

6. Please, how to install latex in wordpress

7. No se puede instalar latex en wordpress, lo q se puede hacer es instalar la utilidad xclip