LaTeX2WP is a program that converts a LaTeX file into something that is ready to be cut and pasted into WordPress.
This way, you can write, and preview, your post in LaTeX, then run LaTeX2WP, and post into WordPress whatever comes out.
Why would you want to do that? Most users of WordPress wouldn’t.
But if you have ever found yourself typing
<p align="center"> $ latex \displaystyle \mathop{\mathbb E}_{x\sim X} f(x):= 1 \ \ \ \ (1)&fg=000000$ </p>
in order to get
and wondered whether there is a better way, maybe this is for you.
WordPress does a good job supporting simple LaTeX expressions. You type $ latex 2^{2^k}$, and out comes . There are, however, some inconveniences if you are typing something more complex:
- The editor windows is small, and it can be slow to save and produce a preview;
- Simulating LaTeX’s displayed equations is a bit painful. If one wants to have numbered equations, they have to be numbered by hand; if one wants to insert one more equation or rearrange the order of presentation, equations must be renumbered by hand, and so do all references to equations;
- If one wants to publish the notes/ expositions posted on WordPress, then one needs to convert them back to LaTeX.
There are also smaller concerns: for example some WordPress themes (including in theory‘s one) typeset LaTeX equations in gray. This can be changed by appending &fg=000000 to every formula, which is nice to automate. If you are used to having simple macros like \E for expectation, it is annoying to have to type {\mathop{\mathbb E}} each time.
With LaTeX2WP you write your whole post in LaTeX, and use LaTeX to preview it. You cannot use arbitrary macros, but any macro that can be implemented by a simple substitution can be easily added. Any set of theorem-like environments such as theorem, lemma, proposition, remark, etc. can be defined, with any combination of counters. Displayed equations are automatically numbered and centered, and all math equations are typeset with black fonts. The LaTeX commands \label, \ref and \eqref are supported, and \ref and \eqref translate to clickable links. You also maintain a LaTeX source for your post, which is ready for publication in another venue.
So far LaTeX2WP has been used at what’s new and here, at in theory. You’ll notice that the typesetting styles for theorems and section names look different. It is easy to modify the typesetting options to suit your own taste.
I would like to thank Terry Tao with his patience while using a very buggy early version and suggesting several useful improvements.
LaTeX2WP is distributed as free software with a GPL 3 license.
(More or less, this means that you can do with it whatever you like. If you create and distribute a modified version, however, you must distribute it as free software under the same GPL license and credit me for having written the original version.)
If you would like to try it out, click the download tab. If you would like to learn more about the features and limitations of LaTeX2WP, or if you are using it and have a question or a bug report, click the using LaTeX2WP tab.
If you end up using it, do let me know, by commenting on this page or by sending an email to LaTeX2WP at gmail dot com. Do include a link to your blog.

190 comments
Comments feed for this article
February 21, 2009 at 1:59 pm
Converting LaTeX to WordPress « in theory
[...] LaTeX to WordPress [...]
February 21, 2009 at 7:13 pm
atri
Luca,
This sounds great. Thanks for making this available. I maintain a blog for my coding theory course and the limitations of wordpress LaTeX support has been somewhat annoying. I’m looking forward to using your program to make my life much easier. Thanks again.
February 21, 2009 at 11:20 pm
Geoff Briggs
Excellent! Would you consider licensing this under GPL V2 or GPL V2+? Some people at big companies (e.g. Microsoft) can’t contribute to GPL3 software because of its terms regarding patents.
February 22, 2009 at 9:39 am
rjlipton
I will try this out. Looks really like great idea…dick
February 23, 2009 at 8:55 am
Dima
Cool! I’ll give it a try, definitely.
etc etc.
Meanwhile, I have invented my own little hack to type maths in WP by using an external editor (vim in my case) that is called up by a Firefox plugin called It’s all Text, and where I have few pre-defined abbreviations to speed up the typing, e.g. $$ to type “$ latex”, i.e. the beginning of LaTeX formula, ZZ for the proper mathbb symbol for
February 25, 2009 at 4:56 pm
ccarminat
I think I have found some bug: I typed
\begin{document}
$\Phi:I_1 \to I_2$
$$\Phi \circ T_1=T_2\circ \Phi$$
\end{document}
But I obtained
I would call it the phi-bug
February 25, 2009 at 5:17 pm
luca
You are right, it’s because the substitution rule used to render \P as
is applied to every occurrence of ‘\P’ even if \P is followed by other alphabetic characters, and so is a different LaTeX command. I’ll fix this in the next revision (which should be coming out by the end of the week)
February 25, 2009 at 10:33 pm
ccarminat
Grazie mille, e buon lavoro!
c.c.
February 27, 2009 at 11:57 pm
Kevin L
Thank you!!! This is wonderful!
March 1, 2009 at 4:45 pm
LaTeX2WP Update « in theory
[...] LaTeX to WordPress [...]
March 3, 2009 at 11:21 pm
580 -Cardinal arithmetic (7) « Teaching page
[...] -Cardinal arithmetic (7) [This document was typeset using Luca Trevisan's LaTeX2WP. I will refer to result (or definition ) from last lecture as [...]
March 3, 2009 at 11:33 pm
andrescaicedo
Hi,
I just made public the first post I wrote using your program. Thank you very much! You have saved me hours already. (The link in the previous comment is from the blog.)
There were a few (minor) strange anomalies during the conversion:
1. The first two lines disappeared; instead, it only appeared “Luca Trevisan” (and a link).
2. I had a definition by cases that refused to compile. I have used the LaTeX array command in previous posts, so I am not sure what the issue was.
3. The last line from paragraph -7 disappeared.
4. A few things were supposed to appear in blue, but didn’t.
(I am not sure whether I should have posted the bugs here or in the entry for Using LaTeX2WP; sorry.)
March 3, 2009 at 11:42 pm
luca
Andres: I am happy the program (sort of) works for you.
I wonder what causes the problems you had. If you send me the LaTeX source (at the address latex2wp at gmail dot com) I could try to replicate those anomalies and understand what caused them.
March 4, 2009 at 12:34 am
305 -5. Extensions by radicals « Teaching page
[...] -5. Extensions by radicals (This post was typeset using Luca Trevisan’s LaTeX2WP [...]
March 15, 2009 at 7:37 pm
Hardness of approximation - Lecture 1 « Expanders, Property Testing and the PCP theorem
[...] am typing this lecture to test Luca Trevisan’s latex2wp converter. I probably won’t have the time to type lectures any more this semester. Here’s a brief [...]
March 21, 2009 at 11:07 am
Only A Test « Mr Toms MathPhys Extravaganza
[...] Only A Test By tomdickens This is simply a test of the Latex to WordPress converter available here. [...]
April 3, 2009 at 6:55 am
ateixeira
Hi there! Finall I manged to get the time to finish my post using your program and I have to say that it came out very good. The only down side is that I had to change my theme. I used to have a black background theme but since the text in theorem-like environments grayish it’d been harder to read for my two or three usual readers. I tried to understand why this was so but couldn’t solve the problem and just changed the theme.
Anyway thanks a lot for providing us with a tool that makes math easier on WordPress.
http://climbingthemountain.wordpress.com/2009/04/03/real-analysis-limits-and-continuity/
April 3, 2009 at 2:50 pm
Academic Career Links
Thanks! Great stuff!
April 6, 2009 at 1:44 pm
ateixeira
Just to tell you that I managed to bet back to my old theme since I could sort out the html code in order to get tables around my theorem like environments.
Once again thanks a lot for this tool.
April 8, 2009 at 7:53 pm
rjlipton
I thank you for this program. One issue math inline seems to be typeset below the line more than it should. Is that a wordpress issue or is that something we can fix?
April 16, 2009 at 1:29 pm
ratnuu
Excellent script suit. I was so annoyed by the wordpress message ‘unable to parse the equation’,until I hit upon this site. This did wonders to me. Thank you so much for sharing the script.
I am looking forward to have tikz/pgf supported as well:-)
Best regards
R
May 12, 2009 at 9:01 am
Welcome « VeRTEx
[...] int_{a}^{b} f(x) dx = frac{pi}{2}” yields . There is also a LaTex-to-WordPress converter here which could be [...]
May 18, 2009 at 2:03 pm
pablolessa
Thank you very much for this great program.
¿Is it posible to set latex2wp up so that it works with a utf-8 source file? Since I write primarily in spanish it’s a minor inconvinience to have to add the accents later… Typical example: “demostración” converts to “demostración”.
Thank you once again.
May 20, 2009 at 8:48 am
LaTeX2WP minor update « in theory
[...] LaTeX to WordPress [...]
May 22, 2009 at 9:53 am
ateixeira
To pablolessa:
You can use the Spanish option of the babel package.
Some texts that I write in Portuguese are done that way and I’m not having any problems with accents so far.
May 25, 2009 at 12:14 pm
About the Blog « Math Questions
[...] http://lucatrevisan.wordpress.com/latex-to-wordpress/ [...]
July 24, 2009 at 8:21 am
An interesting inequality due, perhaps, to Kashin « Mathematical Remarks
[...] to Kashin Published July 24, 2009 Analysis Leave a Comment In order to test the latex2wp software, I’ve dug out an old file and will post it here. There might be something [...]
July 26, 2009 at 4:40 am
O displaystyle do LaTeX permite uma melhor visualização no WP « problemas | teoremas
[...] acrescentar, no fim, a todos, o código &fg=000000 , como é explicado, por exemplo, em LaTeX to WordPress do blogue ” in theory [...]
July 28, 2009 at 11:35 am
Latex2wp Example.html « random terrain
[...] look like on wordpress, when you have converted the ‘example.tex’ file provided with Latex to WordPress to html using the program. Look at the document source to see how to strike out text, how to use [...]
July 31, 2009 at 8:09 pm
Mark Lewko
As requested above, I am using LaTeX2WP over at lewko.wordpress.com. I’ve been very happy with it.
August 4, 2009 at 5:29 pm
Akhil Mathew
I’ve been using LaTeX2WP and find it quite useful when contributing to the Delta Epsilons group blog (deltaepsilons.wordpress.com).
Thanks for making it available!
August 26, 2009 at 7:40 pm
Octavian
Dear Luca, thanks for your work.
But actually I know nothing about python. When I write pyhton latex2wp.py example.tex in the command line, I read this message:
File ‘”, line 1
python pyhton latex2wp.py example.tex
^
SyntaxError: invalid syntax
Help me, please…
August 30, 2009 at 8:55 am
ateixeira
Hi Octavian!
Have you made any change in the files provided by Luca? I think that’s why you’re getting a syntax error.
http://climbingthemountain.wordpress.com/about/
September 2, 2009 at 2:02 am
Uwe Stroinski
First of all: Great tool! I am currently trying it and have two observations:
1) \noindent is noz recognized
2) \newcommand does not parse
Any idea? Especially on the second? Thx in advance.
September 2, 2009 at 12:03 pm
luca
I’ll add \noindent in the next release, but \newcommand is not coming any time soon.
September 4, 2009 at 4:09 pm
Lect 3: Stable Marriage Problem « Introduction to Algorithm Analysis and Design
[...] Lect 3: Stable Marriage Problem (This post is typeset using LaTeX2WP) [...]
September 8, 2009 at 11:30 pm
Uwe Stroinski
A couple more observations of no real practical concern, but probably nice to know:
1) \nonumber is not supported
2) paragraphs before and after \begin{description} seem to get deleted occasionally.
3) \usepackage[all]{xy} is not supported (that seems to be WordPress)
The output in my blog currently looks ‘Taoesque’. How can one steer that more towards ‘in theory’ style? Is this because of the &fg=000000? A small hint would suffice. Thx.
September 9, 2009 at 10:05 pm
leandromat
Awesome !!!!
Thank you very much, for let available the LaTeX2WP program.
September 19, 2009 at 3:15 am
ugroh
Luca, the program is great. Thank you for it.
My question: Since I am publishing in German, I would like to habe “Satz” instaed of “Proposition” e.q. I tried to chace it in macrosblog.tex
\newtheorem{proposition}[theorem]{Satz}
no result. Then I worked through latexwpstaly.py, but I don’t know how th chance it there. Al what I have done produced error messages.
Is this coded soemwehre else? Can you please help me?
Thanks
Ulrich
September 19, 2009 at 3:36 am
ugroh
.. forget the question. I got it reading more carefully the README file.
Ulrich
September 19, 2009 at 1:32 pm
Mithrandir
Does it know how to render source code?
September 20, 2009 at 12:40 am
Shalin Mehta
Dear Luca,
This is an excellent tool! I have a feature request. Is it straight-forward to have fixed-width columns in a tabular environment? I mean the p{width} or m{width} type columns in standard latex tabular environment. I am typesetting a table for my blog for which I need it.
best
Shalin
September 21, 2009 at 12:26 am
Shalin Mehta
I have ended up typesetting two pages with this script.My home page at http://shalin.wordpress.com and a post http://wp.me/p8BPt-4d. The M variable in latex2wpstyle.py seems like the key to extension. I want to add support for font-sizes and typesetting of code. I tried adding following substitution strings:
["\\begin{verbatim}","
"], ["\\end{verbatim}",""],
["\\begin{large}",""],
["\\end{large}",""]
But nothing happens. It seems every environment that is not listed in theorem-type environments in latex2wpstyle.py is ignored. Is that true? Is there a straightforward way of adding support for the above.
Once again, thanks.
Shalin
September 21, 2009 at 12:31 am
Shalin Mehta
Oh, the interesting bits were interpreted out. Following is what I tried. per=pre, sapn=span.
["\\begin{verbatim}",""],
["\\end{verbatim}",""],
["\\begin{large}",""],
["\\end{large}",""]
September 21, 2009 at 12:33 am
Shalin Mehta
Alright, the angular brackets are a culprit. Removed them.
["\\begin{verbatim}","pre"],
["\\end{verbatim}","/pre"],
["\\begin{large}","span style=\"font-size:x-large;\""],
["\\end{large}","/span"]
September 28, 2009 at 9:10 pm
Feedback Statistics « Introduction to Algorithm Analysis and Design
[...] Feedback Statistics Sorry for being so late on this but I finally got around to making pie-charts of your responses to the second feedback form. The results are below the fold. (The text part below is typeset with LaTeX2WP.) [...]
October 6, 2009 at 7:36 pm
Project Proposal « Dynamic Programming and Stochastic Control
[...] to use directly if you have a lot of equations, so I recommend that you use for example the little converter LaTeX2WP written by Luca Trevisan. With this tool, you can use the same file to prepare a hard copy [...]
October 8, 2009 at 10:20 pm
Long LaTeX posts in WordPress.com « Math840's Blog
[...] LaTeX2WP, written by Luca Trevisan, is a Python script that will convert a LaTeX file into a format suitable for pasting into a WordPress.com post. Hence you need Python, which is automatically embedded in Unix, Mac OS and Linux(all distributions), in your system. Just click the link to see the details and instructions. Please Make sure to download the latest version. [...]
October 9, 2009 at 7:55 am
Steven Heilman
Hi-
This converter is excellent thanks! I should begin posting articles regularly at:
http://bfrank.org/overeducated/
So far, I am doing footnotes and references manually, (I am not a clever enough programmer to code such things), so I hope this support will be provided at some point.
Thanks!
-Steve
October 15, 2009 at 11:27 pm
LaTeX nach WordPress – Der Schockwellenreiter
[...] LaTeX2WordPress (GPL) ist ein Programm, das LaTeX-Dateien zu irgendetwas umwandelt, das dann direkt per Copy & Paste in WordPress eingesetzt werden kann. Das Teil ist in Python geschrieben, sollte also überall dort laufen, wo ein einigermaßen aktueller Python-Interpreter exisitiert (Download). [Peter van I. per Email.] [...]
October 21, 2009 at 1:03 pm
Latex2WP « Ceterum Censeo
[...] Latex in WordPress ausprobieren möchte wird hier und dort [...]
October 29, 2009 at 10:52 am
Displaying mathematics on the Web « What’s new
[...] of LaTeX and convert it into a web page or vice versa, although tools such as Luca Trevisan’s LaTeX to WordPress converter achieve a heroic (and very useful) level of partial success in this [...]
October 29, 2009 at 2:30 pm
LaTeX to WordPress. Something for my col… « Paul M. Watson
[...] 10:30 pm on October 29, 2009 Reply Tags: web (657) LaTeX to WordPress. Something for my colleagues at the TSSG who regularly put proposal documents through a build [...]
October 30, 2009 at 9:44 am
porton
It would be great to also make automated conversion from LaTeX to some wiki formats (e.g. MediaWiki and wikidot.org). I think we are to add it in a future version of “LaTeX to WordPress”.
November 4, 2009 at 5:00 am
LaTeX in WordPress « A test
[...] a LaTeX file into code one can copy and paste into WordPress. I found this program at this blog: LaTeX to WordPress. The author provides a .zip archive with several files. The archive can be downloaded from here: [...]
November 4, 2009 at 2:54 pm
Displaying maths online, II « What’s new
[...] of tools for converting mathematics into web friendly formats (e.g. LaTeX2HTML, LaTeXMathML, LaTeX2WP, Windows 7 Math [...]
November 4, 2009 at 4:02 pm
peeterjoot
I didn’t end up using your script as is, because I’d already written one by the time I found this. I did borrow from it though and now use the p align center stuff that you did for my wordpress blog (http://peeterjoot.wordpress.com/)
My script, a version of which is here in case anybody else wants to use it is here:
http://sites.google.com/site/peeterjoot/math2009/tex2blog
(includes an option also for experimental conversion of latex to mathml output for blogger where javascript is allowed).
A couple differences from your script:
- I can’t grok the python used enough to modify yours to do more complex macro replacements, and cobbled together some using perl that mostly work.
- I require the latex be compiled since I use the .aux and .bbl files to generate equation numbers and bib contents.
November 6, 2009 at 9:27 pm
LaTex Example « Euler's maze
[...] Euler's maze a blog on neuroscience « Neuroanalysis by AVI PELED LaTex Example November 7, 2009 Copyright by LaTex to WordPress [...]
November 7, 2009 at 10:43 am
porton
Braces should be removed from the text, as in this example:
\documentclass{letter}
\begin{document}
{Braced}
\end{document}
In HTML generated by L2WP “Braced” is erroneously shown braced.
November 7, 2009 at 4:21 pm
porton
Please add at the beginning of your script:
#!/usr/bin/python
November 12, 2009 at 7:37 pm
hailtt
November 14, 2009 at 8:59 pm
LaTeX2WP, Princeton grad student seminar, and characteristic polynomial coefficients « A Day in the Life of a Wild Positron
[...] in order to test out Luca Trevisan’s LaTeX2WP converter, which can be downloaded for free here. (So this is my learn-how-to-use-the-program post). It will clearly be helpful for my own blogging [...]
November 21, 2009 at 9:52 pm
timur
To porton: There are tools such as latex2wiki and latex2qwiki. Google will reveal them immediately.
November 23, 2009 at 8:18 pm
Feedback 3 statistics « Introduction to Algorithm Analysis and Design
[...] Feedback 3 statistics (Most of the text was typeset using Luca Trevisan’s LaTeX2WP) [...]
November 24, 2009 at 12:01 am
QuickLinks vom 17. November bis zum 24. November — instant-thinking.de
[...] LaTeX to WordPress – is a program that converts a LaTeX file into something that is ready to be cut and pasted into WordPress. [...]
November 27, 2009 at 4:32 am
using latex for wordpress « Musings of a curious mind
[...] but never fear there is always google to rescue you. So I found this nice little program listed on Terence Tao’s blog which a latex-to-wordpress python file quite nifty! Well you also have to have the python shell [...]
December 1, 2009 at 1:43 pm
Miro Benda
December 1, 2009 at 2:25 pm
Miro
December 1, 2009 at 2:44 pm
Miro
Ignore please, testing.
How will this work?
December 1, 2009 at 3:06 pm
Miro
Ignore please again; one more thing to test:
Define
iff
That is it.
December 1, 2009 at 3:09 pm
Miro
Please ignore, one more test:
Define
iff
That is it.
December 1, 2009 at 3:16 pm
Miro
Still testing
OK?
December 9, 2009 at 7:21 pm
vadim
Ok, THANK YOU. I hope it’ll work.
December 15, 2009 at 8:44 am
dGoliat
Hi-
Thanks by this excellent converter! I am using it at:
http://wdb.ugr.es/~edp/blogs/nonlinear_analysis/
Thanks!
dGoliat
December 15, 2009 at 7:27 pm
MATLABician
Hi Luca,
Thanks for this converter. Currently, the lines enclosed in \ifblog…\fi are also processed and have their double returns converted to and their multiple spaces/single returns to a single space. If this structure is used to put source code in WordPress, this changes the formatting, which is undesirable. Is there a way to suppress this processing so that a verbatim sort of environment is provided by \ifblog…\fi—I see where this is done in latex2wp.py but when I suppress the corresponding lines, display style equations don’t get the WordPress latex affix and suffix appended to them— or better yet, to provide support for listings environment?
December 30, 2009 at 1:57 pm
A great tool « Rolfe's Lecture Notes
[...] great tool By Rolfe Schmidt I’ve started using latex2wp to convert my lecture notes to wordpress format, and it is great. I spend far less time futzing [...]
January 4, 2010 at 1:17 pm
LaTeX in WordPress « Eikonal Blog
[...] Download: http://lucatrevisan.wordpress.com/latex-to-wordpress/ [...]
January 12, 2010 at 8:58 pm
Lecture material 1: Introduction, linear codes « Introduction to coding theory (CMU, Spr 2010)
[...] post was typseset using the LaTeX to WordPress-HTML converter LaTeX2WP.] Leave a [...]
January 13, 2010 at 7:39 am
ateixeira
Hi Luca!
I’m already using your script at my wordpress.com blog but I tried using it at blogger too (using also a javascript that allows for LateX code to be rendered) but I had some problems with it. For some reason hyper references don’t work…
Do you mind if I send you via email my changed code to see if you can help out a bit with the hyper references bug?
January 17, 2010 at 2:37 am
Using LaTeX in WordPress « God, Your Book Is Great !!
[...] tool to convert a LaTeX file to a form ready to be copy pasted to WordPress. It can be downloaded here. I have not used it myself per se, but I intend to use it a lot in the near future. Given the fact [...]
January 19, 2010 at 12:22 am
Rubbervita
Sounds interesting, gonna try this out!
January 21, 2010 at 10:47 am
LaTeX Blogging with Emacs « Curious Reasoning
[...] a nice little python script called latex2wp.py which you can read about here. It takes your Latex document and outputs html which can be cut and pasted into WordPress. But [...]
January 28, 2010 at 1:22 pm
More on Blogging in Latex « Curious Reasoning
[...] any images I include and have them uploaded and linked in automatically. Unfortunately, the script latex2wp.py which I described before doesn’t really do anything like [...]
February 10, 2010 at 6:56 am
Thw show is back on the road « Climbing the Mountain
[...] took the time to conver the previous posts using the latex2wp converter and I already have the html files of all the previous posts (and have already posted some [...]
February 11, 2010 at 11:27 am
A new address « Climbing the Mountain
[...] will still use LateX2wp (with a few minor alterations for it to work in Blogger) in my new joint so things will continue to [...]
February 12, 2010 at 12:36 pm
Return to LaTeX | neverendingbooks
[...] to do this? Well, as far as I know, Terry blogs in LaTeX and then uses a python-script called LaTeX2WP ’a program that converts a LaTeX file into something that is ready to be cut and pasted into [...]
February 13, 2010 at 9:13 pm
Posting items to my blog using wplatex « Division by Zero
[...] WordPress blog, complete with title, tags, and categories. From what I can tell, it is based on LaTeX to WordPress (LaTeX2WP.sty). For more information, look the following posts at the Curious Reasoning blog: 1 – 2 – [...]
February 21, 2010 at 3:30 am
anonymous
Great utillity
The following do not work
a)\subsubsection
b)eqnarray
February 24, 2010 at 9:50 am
Really having problems with Latex « Worked Problems in Physics
[...] having problems with the WordPress plugin for Latex. Trying writing by hand, and also using the latex2wp program, but both have serious problems, and I may not continue this series until I find a better solution. [...]
March 5, 2010 at 5:38 am
LaTeX wordpress problems solved « Worked Problems in Physics
[...] I made a few minor modifications to my workflow, and now both the latex/wordpress plugin and the latex2wp program are working without any problems. Here’s what I had to [...]
March 10, 2010 at 9:39 am
ioannis parissis
Hello there. First of all I wanted to let you know I am using Latex to WP for my blog. I only have very few entries so far but I have noticed that latex code is always very blurry. I am sure this is not a problem of latex2WP but I do not really know where to ask to solve the problem. Look here for example
http://yannisparissis.wordpress.com/2010/02/05/the-discrepancy-function-in-two-dimensions/
Any help would be most appreciated!
March 15, 2010 at 2:04 pm
ateixeira
I’ve just see your blog and it doesn’t seem to be blurry at all. Does your equations look blurry in all computers you use? Have you tried changing themes just to see how it looks like?
March 15, 2010 at 6:00 pm
ioannis parissis
Thanks for the answer. I just realized that the problem was my browser’s settings. For some reason the size was reduced from the default (-1 from the default) and that made the latex part of the blog look blurry. Same effect if you increase the size (cmd/cntrl+ or cmd/cntrl -). So that way i discovered that latex code looks nice only with the default size for web pages.
March 17, 2010 at 9:20 am
Gettin’ Started « I study
[...] also recommend a great tool – LaTeX to WordPress, it is really [...]
March 21, 2010 at 3:49 am
I learn
[...] write something nontrivial in one can use a great tool LaTeX to WordPress, I use it all the time. [...]
April 3, 2010 at 8:08 pm
vieuxgirondin
Thanks! Enjoyed using your application.
April 9, 2010 at 11:46 pm
Mathematical Approaches to School Districting » April 10, 2010: how time flies…
[...] to this site, maybe we can give it a try here to copy-paste to see if it works the same [...]
May 3, 2010 at 8:09 pm
For those using LaTeX | The Cryptography Reading Group
[...] Lastly, I use a very efficient LaTeX to WordPress’s LaTeX converter written (in python) by Luca Trevisan. This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with [...]
June 9, 2010 at 1:08 am
Convert/Use Latex for HTML « 01law's Blog
[...] Latex2WP does pretty good job to convert latex to wordpress [...]
June 14, 2010 at 9:11 am
Итоги дистанционной авантюры | Hsecoopgames's Blog
[...] латех в код для вставки в wordpress можно специальным скриптом на питоне. Графики в латехе можно рисовать кучей [...]
June 24, 2010 at 11:23 pm
daFeda
Much appreciated.
July 13, 2010 at 1:04 pm
TeX and LaTeX links « Eikonal Blog
[...] to WordPress – http://lucatrevisan.wordpress.com/latex-to-wordpress/ Leave a [...]
August 7, 2010 at 7:09 am
LaTeX e Wordpress: LaTeX2WP | Incerteza em Princípio…
[...] funcionamento do programa é bem simples. Você deve baixar o arquivo compactado na página http://lucatrevisan.wordpress.com/latex-to-wordpress/download/ , descompactá-lo num diretório onde esteja seu arquivo .tex, e executar o [...]
August 21, 2010 at 1:18 pm
TeX杂文——转自ChinaTeX新浪博客 | Sun Ju's Blog
[...] (wordpress就稍胜一筹,有嵌入的对Latex的支持功能。另外这个latex2wordpress 插件的开发使大量的公式的嵌入变成小菜一碟) [...]
September 1, 2010 at 7:29 pm
Wordpress help « Introduction to Algorithm Analysis and Design
[...] If you know LaTeX, you can consider using Luca Trevisan‘s LaTeX to wordpress (html) convertor. [...]
September 9, 2010 at 11:32 am
David
I installed the 64-bit version of Python 3.1 on my 64-bit Windows 7 computer and followed the compile instructions. Running the command
python latex2pw.py example.tex
inside a terminal window in the directory containing the file example.tex does not create a file named example.html. Instead it produces an error message as follows:
Traceback (most recent call last):
File “latex2wp.py”, line 657, in
s=extractbody(s)
File “latex2wp.py”, line 140, in extractbody
for i in range(1,(len(L)+1)/2) :
TypeError: ‘float’ object cannot be interpreted as an integer
September 12, 2010 at 10:05 am
Project Update Sept 2010(and other small things). « Acyrl's Blog
[...] I also found this interesting thing Latex2WP , which allows you to convert a .Tex file into a format which you can put in wordpress. Full explanation and download can be found here. [...]
October 15, 2010 at 1:33 pm
First post « Indiscernable
[...] by Latex2wp script) Posted by Dmitry Sustretov Filed in Uncategorized Leave a Comment [...]
October 21, 2010 at 6:37 pm
Blog for Graduate Computational Complexity 2010 | Computational Complexity, Fall 2010
[...] the posts we’ll be using the Latex2WP by Luca [...]
November 28, 2010 at 1:13 am
A
{F = F_+ – (F_+-F_)}
December 7, 2010 at 12:22 am
Link problems : Markdown versus latex2wp.py | neverendingbooks
[...] Ever since the Return to LaTeX post, I’m trying to re-educate myself to write posts in LaTeX and convert them into wp-format using the Latex2WP python script. [...]
December 21, 2010 at 2:16 am
About « mathTHÍCHinTOÁNmyHỌCbrain
[...] theorems. (To use the CSS, one needs to purchase a CSS upgrade.) I also use Luca Trevisan’s LaTeX to WordPress converter to write the more mathematically intensive [...]
January 5, 2011 at 6:17 am
growescience
Great program – thanks very much. I’m now using it to produce pages for my physics/math tutorial blog at http://physicspages.com/.
One little snag I found with it though. When converting an eqnarray*, each line of the array is rendered using inline format so that fractions are squashed to fit into a single line. Even though the array as a whole has a \displaystyle tag, it seems not to affect the array elements. I’ve fixed this by converting an eqnarray* to a “eqtabular” object of my own invention, and then converting each element within that table into a separate Latex element with its own \displaystyle tag.
As I’ve never written anything in Python before, I’m not sure how robust my fix is though.
January 8, 2011 at 7:24 am
Hello world! | conlatio
[...] You can read more about LaTeX2WP and download it from LaTeX to WordPress [...]
January 24, 2011 at 6:18 pm
Guidelines for adding new posts « ISM and Star Formation
[...] to use Latex? Visit this site or try this LaTeX to WordPress Converter LikeBe the first to like this post.▶ No Responses /* 0) { jQuery('#comments').show('', [...]
January 30, 2011 at 11:15 pm
Recurrence and genericity – a translation from French « Area 777
[...] the French exam earlier this week (without knowing any French) and also to test this program ‘latex to wordpress‘, I decided to post my French-translation assignment [...]
February 6, 2011 at 7:00 pm
The Simplex Algorithm | Jingjin Yu
[...] A PDF of this document is available here. This web version is made with the python scripts from latex to wordpress by in [...]
March 12, 2011 at 9:34 pm
与非
Thank U!
I‘ii try it:)
March 16, 2011 at 9:30 am
Reviewing the regularity theory of elliptics PDEs via the Laplace equation. Part I. «
[...] this post was made using Luca Trevisan’s Latex to WordPress program, which is very useful although I am still getting used to using it. It allows you to [...]
March 17, 2011 at 6:26 pm
Karhunen-Loève expansions: A primer « Electric Death Metal
[...] much it for the moment. I just want to add that this entry was brought to you with the help of LaTeX2WP, this super-neat Python script that converts LaTeX file to discernible HTML ready to copy-paste to [...]
March 28, 2011 at 4:55 pm
A (Hopefully) Concise Introduction to the Simplex Algorithm | Jingjin Yu
[...] PDF file of this document is available here. This web version is made with the python scripts from latex to wordpress by in [...]
March 30, 2011 at 2:53 am
joergpreiss
I had to add in line 255:
while T[p-1] != “\\end{tabular}” and T[p-1] != “\\end{btabular}”:
if format[i]==”|” :
i=i+1
continue
(cut horizontal lines)
April 10, 2011 at 11:55 am
MCF
Use…
http://www.codecogs.com/latex/eqneditor.php
April 21, 2011 at 9:39 am
notesonmath
Thanks!
April 26, 2011 at 11:51 pm
Latex2wordpress « under the sun
[...] I found this amazing program LaTeX2WP which translates Latex file to HTML that is ready to be cut and pasted into WordPress editor. Luca Trevisan [...]
April 28, 2011 at 12:27 am
timcyku
I tried it. It is amazing! Thanks! see
http://randomku.wordpress.com/
May 4, 2011 at 9:05 pm
Lovasz theta number « a short fat boy and his chalkboard
[...] it is appropriate to post one entry on the last lesson in class. This is also my attempt to use LaTeX2WP, which `is a program that converts a LaTeX file into something that is ready to be cut and pasted [...]
May 4, 2011 at 9:07 pm
mrkiah
As instructed, thanks!
May 15, 2011 at 1:49 am
Necros
$latex $$\left( {{b_j}} \right)_{j = 0}^\infty $$ $
May 15, 2011 at 1:58 am
Necros
I’m sorry, please ignore what I posted.
![\[\left( {{b_j}} \right)_{j = 0}^\infty \] \[\left( {{b_j}} \right)_{j = 0}^\infty \]](http://s0.wp.com/latex.php?latex=%5C%5B%5Cleft%28+%7B%7Bb_j%7D%7D+%5Cright%29_%7Bj+%3D+0%7D%5E%5Cinfty+%5C%5D+&bg=ffffff&fg=545454&s=0)
This is just a test.
May 16, 2011 at 4:53 pm
Diversions: project Euler | The Approximist
[...] with this Latex document (which will be converted to HTML and put up on my blog thanks to Luca Travesan’s Python Script) I am doing all my editing in vim. So its a convenient thing, I browse the web, where I am looking [...]
May 23, 2011 at 2:37 am
Latex to Blogger powered by MathJax (Experimental) | Vision and around
[...] already an excellent tool (latex2wp) that serves the conversion from and WordPress as I noted before (and best advertised by Terry [...]
May 25, 2011 at 5:59 pm
testing out some LaTex « "pewter walruses fight under sparkling orange trees yelling obscure mantras"
[...] maybe I’ll figure out how to size this crap later on. and here is an interesting post with another option for using LaTex that I might consider sometime down the [...]
May 30, 2011 at 1:40 am
The Riesz Representation Theorem – I « Nirakar Neo's Blog
[...] I figured out how to convert LaTeX to WordPress content. Thanks to LaTeX to WordPress. My first post is an experimental one. I have chosen Riesz representation theorem (in abstract [...]
June 11, 2011 at 3:28 am
You might be wondering: Mathematical blogging « Yang-Baxter Equations & Integrable Systems – 2011
[...] Here is some information about a special program one can use to convert LaTeX files into WordPress blog posts. It might be worth looking into. [...]
June 13, 2011 at 3:09 pm
Welcome: 2011 Edition! « VeRTEx
[...] int_{a}^{b} f(x) dx = frac{pi}{2}” yields . There is also a LaTex-to-Wordpress converter here which could be [...]
June 21, 2011 at 9:59 am
Anand Sarwate
I’m late to the party but I’m using it now! http://ergodicity.net/
June 21, 2011 at 10:25 am
The strong converse for the MAC, part 3 « An Ergodic Walk
[...] Anand Sarwate under Uncategorized Leave a Comment This post was written using Luca’s LATEX2WP [...]
August 3, 2011 at 2:24 pm
donuts
August 5, 2011 at 3:03 pm
A few more thoughts and advices about LateX « The Quantum Gang
[...] and why I think that the contributors of this blog should write their posts in LateX and then use Luca Trevisan’s script to convert the .tex file into [...]
August 10, 2011 at 5:33 am
NICO VENGEANCE
I just found out about the “latex” a month ago. Then finally I tried to write using the latex and the results are excellent. but had to be careful if you do not want to error.
September 4, 2011 at 12:33 am
Luqing Ye
Does Latex2wp support Latex essays which involve Chinese?
October 22, 2011 at 7:05 pm
Power tool for mathematical blogging « Brenton LeMesurier
[...] If you want to prepare blog posts using latex and then convert them for cut and paste into a WordPress.com blog, try LaTeX2WP [...]
November 20, 2011 at 5:34 pm
LaTeX to WordPress (latex2wp.py) « Guzman's Weblog
[...] post was created using LaTeX to WordPress. LaTeX2WP is a program that converts a LaTeX file into something that is ready to be cut and pasted [...]
November 21, 2011 at 5:50 am
LaTeX to WordPress (latex2wp.py using terrystyle.py) « Guzman's Weblog
[...] post was created using LaTeX to WordPress with the Terry Tao style. LaTeX2WP is a program that converts a LaTeX file into something that is ready to be cut and pasted [...]
November 24, 2011 at 1:01 pm
Neural Outlet..
Hey, do you know if it is possible to use Cyrillic letters like Ж or Д in LaTeX formulae? I expect you’d need to load a new packet or something but I’m not sure how.
Could anyone shed some light on the situation?
December 12, 2011 at 8:12 pm
On Writing Posts | musingsbymats
[...] Luca Trevisan wrote a python program that translates a subset of LaTeX (not only the math) into something that can be pasted directly into the HTML editor, for ease of use of habitual LaTeX’ers. It can be found here. [...]
December 22, 2011 at 1:15 pm
Maikol Solís Chacón
Is it possible use macros with arguments in this script?
Thanks.
December 23, 2011 at 11:24 pm
Maikol Solís Chacón
I made a simple change and now it is possible to use the enviroment align*,
Just change this piece of code in latex2wp.py
“”"
changes $$ … $$ into \[ ... \] and reformats
eqnarray* environments as regular array environments
“”"
doubledollar = re.compile(“\\$\\$”)
L=doubledollar.split(m)
m=L[0]
for i in range(1,(len(L)+1)/2) :
m = m+ “\\[" + L[2*i-1] + “\\]” + L[2*i]
m=m.replace(“\\begin{eqnarray*}”,”\\[ \\begin{array}{rcl} ")
m=m.replace("\\end{eqnarray*}","\\end{array} \\]“)
return m
for
“”"
changes $$ … $$ into \[ ... \] and reformats
eqnarray* environments as regular array environments
“”"
doubledollar = re.compile(“\\$\\$”)
L=doubledollar.split(m)
m=L[0]
for i in range(1,(len(L)+1)/2) :
m = m+ “\\[" + L[2*i-1] + “\\]” + L[2*i]
m=m.replace(“\\begin{eqnarray*}”,”\\[ \\begin{array}{rcl} ")
m=m.replace("\\end{eqnarray*}","\\end{array} \\]“)
m=m.replace(“\\begin{align*}”,”\\[ \\begin{array}{rl} ")
m=m.replace("\\end{align*}","\\end{array} \\]“)
return m
I think that with patience it’s possible add many others enviroments.
Regards.
January 10, 2012 at 4:31 am
Vikash
You rocks sir.. Very helpful information.. thanks
January 12, 2012 at 6:53 pm
luca
Maikol: I didn’t implement macros with argument. it’s at the top of the list of desired features for a future release.
January 13, 2012 at 12:52 am
Maikol Solís Chacón
Thank you very much Luca, I’ll be expect the new release.
Regards.
January 27, 2012 at 8:28 pm
tom
This is great. Thanks Luca. Just what I needed. Best, Tom.
February 6, 2012 at 12:42 am
fast acting diet pills
[...]below you will locate the link to some web pages that we believe you ought to visit[...]
February 17, 2012 at 1:04 pm
balanza A&D
[...]please go to the internet sites we follow, like this a single, as it represents our picks from the web[...]
April 27, 2012 at 3:01 am
beni22sof
This is a great tool. I get very good results using it. Way better than the direct way, and the color of the equation text is different and stands out. Thank you.
May 1, 2012 at 8:15 pm
Pochhammer Symbol, Brought to You by latex2wp « its like melting
[...] decided to try out the latex2wp script for converting latex documents into attractive and oft-read blog posts. For my trial [...]
May 28, 2012 at 2:19 pm
By the power of python, from Latex to wordpress | Room 196, Hilbert's Hotel
[...] am very excited! Looking around, I found a really useful tool, a python script called LaTeX to WordPress. With this useful script, I can write my blog posts using my favorite LaTeX editor (TeXMaker), [...]
May 30, 2012 at 7:43 am
Convert your LaTeX file to WordPress smoothly with LaTeX2WP « okaydavid
[...] http://lucatrevisan.wordpress.com/latex-to-wordpress/ Share this:TwitterFacebookLike this:LikeBe the first to like this post. Uncategorized ← Testing the LaTeX2WP example [...]
June 1, 2012 at 4:10 pm
Hello… | My Math Blog
[...] now I am modifying the latex2wp program, making equations more [...]
June 4, 2012 at 4:31 pm
Yi Tang
Just to come to say thank you.
June 30, 2012 at 11:12 am
Ran Rubin
Works like a charm! Thanks!
I’m using it on my (non-public) research lab-journal wordpress site.
I had to change the $\latex to $$ since that what my latex plug-in uses but other than that I’ll use it as is.
Thanks again.
Ran
July 2, 2012 at 8:00 am
Complex Analysis « Andy Soffer
[...] to make it look nice with the themes I have been using. I’m trying out a program called latex2wp, and I’m really liking it. It allows me to write LaTeX with my editor of choice, and then [...]
July 8, 2012 at 12:20 am
Visto nel Web – 34 « Ok, panico
[...] that converts a LaTeX file into something that is ready to be cut and pasted into WordPress. ::: in theory Svelato finalmente il mistero della costruzione dei [...]
July 18, 2012 at 10:18 pm
De Latex a WordPress « Memorandum Matemático
[...] por el blog de Terence Tao, me encuentro en la sección de software esta interesante herramienta LaTeX to WordPress lo que hace esta herramienta es convertir el contenido de un archivo LaTeX a html, lo que nos [...]
July 19, 2012 at 9:41 pm
studeocs
Using your program at studeocs. It’s very nice so far! I need to include citation information in my blog (for example, have a bibliography at the end of the post and numbered in-document links within the text). Any idea how I could automate that? I’ll be using a bib file for all my references. Thanks.
July 27, 2012 at 1:32 pm
kbisonline
HI, I just started blogging and posted my very first blog with your latex to wordpress script. It is very nice, Thanks!
The only thing I noticed is that it seems the following escape sequences are not converted correctly:
1. “\{” or “\}” is rendered “{” or “}” in latex but “\{” or “\}” in latex2wp
2. “\verb|…|” is rendered “…” in latex but “\verb|…|” in latex2wp
3. “\^{}” is rendered “^” is latex but “\^{}” in latex2wp
Please let me know if there is a way to print those special symbols consistently in both latex and latex2wp
Thanks
July 27, 2012 at 10:28 pm
luca
To render curly brackets, put them in a math environment: $\{$ will render as {. Same for ^. Unfortunately there isn’t a simple workaround for the verbatim mode of latex
July 28, 2012 at 4:52 am
kbisonline
Thanks!
August 14, 2012 at 7:42 am
LaTex display « Free Mind
[...] details and usages about LaTeX2WP, one can refer to the author’s blog. See here. Personally I think high of the author’s endeavors. The script was written in Python as was [...]
August 23, 2012 at 2:51 pm
(LaTeX) implementation : random measures
[...] LaTeX to WordPress: This package claims to allow writing blog posts completely in LaTeX and then transferring them to WP after minimal changes. This sounds very attractive, but I am a little wary of this claim. If this works reasonably, this would definitely be my preferred workflow. Write posts completely in LaTeX and use this package to post to WP. [...]
September 9, 2012 at 11:30 pm
AC, part III: Choice in context | whateversuitsyourboat
[...] This post is the first I’ve written using Luca Trevisan’s fantastic latex2wp. I recommend it to all math WordPress bloggers! (Quick test: Does WordPress render Erdős [...]
September 15, 2012 at 8:15 am
Hello « Anurag's Math Blog
[...] is an example of how to use latex in wordpress. Check out this and this before reading [...]
September 25, 2012 at 3:30 am
Maikol Solís
Hi Luca!
I think that if you use some service like github.com to share the code, the community maybe could improve it. This script is very useful and I’ll be glad to help at least a little.
Regards.
October 4, 2012 at 8:23 am
Jessie
I think this is among the most important info for me.
And i’m glad reading your article. But wanna remark on few general things, The site style is great, the articles is really great : D. Good job, cheers
October 8, 2012 at 3:23 pm
neonwatty
Luca,
I bow down before a superior being – thank you so much for making this! Using it for my Machine Learning (and etc.) blog
http://neonwatty.wordpress.com/
best,
Jeremy
October 8, 2012 at 3:31 pm
Latex2WP: the easy way to use latex on a wordpress.com blog « Neon-Watty
[...] just discovered Latex2WP written by the fantastic Luca Trevisan at Stanford – it makes writing Latex for your [...]
October 29, 2012 at 8:30 pm
LaTeX to WordPress « theundefinedlimit
[...] salvation is at hand via Luca Trevisan‘s Python programme, LaTeX to WordPress, described on a post at his blog. This neat solution allows one to create a .tex file almost as one is used to (I use [...]
November 10, 2012 at 3:13 pm
AC, part III: Choice in context | whateversuitsyourboat
[...] so stay tuned! P.S. This post is the first I’ve written using Luca Trevisan’s fantastic latex2wp. I recommend it to all math WordPress bloggers! (Quick test: Does WordPress render Erdős [...]
November 15, 2012 at 6:34 pm
javhaa
$ latex \displaystyle \mathop{\mathbb E}_{x\sim X} f(x):= 1 \ \ \ \ (1)&fg=000000$
November 25, 2012 at 11:41 pm
mixedmath
Hey – I wanted to thank you for this. I’ve just started using it as well.
I maintain a mathblog at mixedmath.wordpress.com.
January 25, 2013 at 10:48 am
xaboblog
$ latex \displaystyle \mathop{\mathbb E}_{x\sim X} f(x):= 1 \ \ \ \ (1)&fg=000000$
February 26, 2013 at 1:02 am
Expected switching for the Dirichlet distribution | Drunks&Lampposts
[...] (By the way to convert the latex in this post into a form easily used in wordpress I used an excellent python package from Luca Trevisan) [...]
February 27, 2013 at 11:28 pm
reverse phone lookup
Supply basic details of a phone number like name of the owner, address and the number itself to get a search will
underway. This process only allows for two removals, so if you have multiple entries in their
database, you may have to use other email addresses to remove all instances
of your information from their website. How can I do reverse cell phone lookup to find
who owns it.
April 7, 2013 at 11:30 am
Arjun Jain
Hi,
used it for my first post- works quite fine, but did have to do some editing.
April 20, 2013 at 7:56 am
jromanmarin
Hello Luca,
I would like to thank you for your latex2wp program. It has helped me a lot! I have also included a link to yours in my own blog.
http://notesoneng.wordpress.com/
Thanks again.
May 2, 2013 at 10:49 am
Alternate derivation of linear response function | Joshua Goings
[...] *Typeset using latex2wp [...]
May 3, 2013 at 1:08 pm
Derivation of Time Dependent Hartree-Fock (TDHF) Equations | Joshua Goings
[...] *Typeset using latex2wp [...]
May 7, 2013 at 9:03 am
Cico
Try this

May 7, 2013 at 9:06 am
Cici