QuickLaTeX.com is a free web service I created to help people include mathematical formulas into the web pages easily and with high typesetting quality.
There are two unique features which make QuickLaTeX.com distinct from the others:
- Correct formula positioning. Besides converting LaTeX code into image QuickLaTeX.com provides information on how to position generated image on the web page properly so that the formula and surrounding text will blend together well. For example, usual online LaTeX service produces formulas like
floating independently from the text which caused by improper vertical alignment relative to text baseline.
QuickLaTeX.com provides formulas like
which is perfectly aligned with the text. -
Meaningful error indication for debugging. In case of mistake in LaTeX code other services return some useless message like:
"Formula does not parse”. On the contrary, QuickLaTeX.com gives detailed explanation on error in LaTeX code. For example, if\sqrtwas misspelled as\srt, QuickLaTeX.com will say so. Please check this screenshot for demonstration.
Another nice thing is that QuickLaTeX.com doesn’t require LaTeX software to be installed on user’s server or hosting account. Feel free to check other pages on this site to see more examples of QuickLaTeX.com in action.
To use it in your WordPress blog you need to install special plugin I developed – WP-QuickLaTeX. Follow simple steps to do that:
- Download WP-QuickLaTeX plug-in.
- Unzip the plugin file and upload its content to
wp-content/pluginsfolder of your blog. - Activate WP-QuickLaTeX through the ‘Plugins’ menu in WordPress.
- If you want maximum performance you might create
ql-cachefolder inwp-content. It will be used by WP-QuickLaTeX for caching necessary data to decrease loading time of your pages. Just make sureql-cacheis writable (bychmod 777or through File Manager in cPanel).
That’s it. Now you can publish mathematics in posts, comments and even titles just placing LaTeX code between tags
or
or
using HTML or Visual mode in WordPress Editor.
Oh, I forget one more step – give me your feedback!
Usage Conditions
Usage of QuickLaTeX.com service is completely free as well as WP-QuickLaTeX plugin itself. Link “Powered by QuickLaTeX.com” would be highly appreciated as well as any other kind of support. Use the comments for questions and bug reports.
I also appreciate your contributions to the development of the plugin, so feel free to email me any code or your suggestions. Your support is very important.
Books I recommend



69 Comments
nice plugin, just one question: why you don’t provide also MathML output for the formulas? At least for browsers that support it, and generate the image for other browsers?
Thank you for the good question!
Main reason is that support of MathML in the browsers is not mature enough. They still render MathML equations in poor quality.
For example, LaTeX produces nice looking formula
y=\sqrt{1-x^2}. Whereas Firefox renders the same formula in MathML notation as:
with jumping square root sign.
Another thing is that there are several LaTeX to MathML converters but none of them solves the task perfectly.
I think MathML is future of math publishing in the web and I will include it in WP-QuickLaTeX someday, but for the moment LaTeX-to-image conversion method is the best in the sense of rendering quality.
Thanks for the very clear reply.
Since I need to display math formulas in an academic website, I am using a mixed solution based on Javascript (JS does the conversion from LaTeX) that displays MathML in Firefox and creates an image for other browsers.
Now, my solution works quite well, but there are some alignment problems with text and formulas’ images. So I am very interested in your solution but for some reasons, I can’t use QuickLaTeX.com service but I can ask to my co-workers to set up a “dedicated” conversion service (the main reason is that the website has a lot of traffic and we can install LaTeX software).
Can I have more info about how your conversion service works? And, would be possible to have a copy of the conversion script? If you want, you can send to me also a private message.
Thanks in advance!
When I have installed your plugin I get an error:
Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /plugins/wp-quicklatex/wp-quicklatex.php on line 76
Any idea?
This means that PHP function
file_get_contents()is disabled on the server where you host your site. Some hosting companies do that as extra security measure.Now my plugin uses this function to get formula from the QuickLaTeX.com.
I’m planning to add support of such restricted servers in the future versions.
Thanks for the quick reply!
I’ve made changes to fix this problem. Please download and try the latest version of the plugin.
Hi there, I try to use your plugin to write a simple formula from least square method. The equation should have a beta hat = (X transpose X) inverse X transpose Y. I just don’t know how to get it right since I can not make the inverse sign (power -1) works right. I can do it with easy latex by this code
, but your plugin can not do that. Any suggestion how to make it right?
In LaTeX, if you want to write something like
A^{-1}you should use this code: A^{-1} and not A^(-1) which is plain incorrect.
For your particular formula we get:
(X^T X)^{-1} X^T.
OK thank, it works well.
, but it doesn’t work. Sorry, novice question.
There is one more thing, I want to use a hat on the beta, I try
Wow, it works well with your plugin. Thank you very much.
Hi Pavel, I am getting:
Error: Cannot create dvi file
Is the service down?
No, that means there is an error in you formula. When this happens QuickLaTeX shows error icon instead of the formula. If you drag mouse pointer to the area of that icon – tooltip with the detailed expanation of the error will be shown.
See screenshot: here.
Hi.
I have simiral problem as Charlie. Using
works, but
doesn’t.
I think, it’s because previously created formulas (matrices, more complex things than just “\cos”,…) works, new doesn’t.
Error: Cannot create dvi file
Thanks for answer
.
Thank you for the debugging!! I’m fixing this bug right now.
Fine. Now it works like a charm
.
Good job.
Hello! Yours is a great service! but, just a pair of questions:
Is there a way to get displaymath LaTeX output?
If there isn’t, do you plan on implementing this on future releases of your rendering engine?
Anyway, congratulations and thank you for your work! =)
Well, I just discovered that \displaystyle does the trick ^_^
Sorry! you can delete this thread if you want…
Hello from turkey. I tried other 3 wp latex plugin too. But yours best. (May be transparency or something else but yours best). I need to say that if you add more services to your plugin, this may perfect. For example:
http://l.wordpress.com/latex.php?latex=
and
http://www.bytea.net/cgi-bin/mimetex.cgi?formdata=
and other services etc… And this is last one: If all servers down we may not add latex equations so can you add an option to convert pics with our server like wp-latex plugin?
Hi
Thanks!
There are several unique features which make my service distinct from the others: correct formula positioning and meaningful error messages.
Other services (like wordpress, mimitex,etc) don’t include these features which make them incompatible/interchangeable with my plugin. That is why I have no plans to support them in the future.
As for the second question about self-hosted service – I’m not ready to share all the source code and scripts. Maybe I’ll do this in the future.
Hi!
Thanks for the great work!
I’ve got some problem with the “-” sign though. When I use something like “\sqrt{1 – 2}” in a formula, the renderer will drop the “-” and just show the squareroot of 12. When I write “\sqrt{1-2}” it works as it should. This is kind of annoying, because my formula editor always exports the tex-code with the whitespaces. And it works fine with ” + “, …
Would it be much work to fix this?
And another bug: The first derivative of a function is displayed correctly as f ‘.
The second derivative however drops both dashes, so if I write f ” it is just displayed as f. It does the same when I add a whitespace between the dashes.
Both bugs are fixed. Sometimes WordPress uses non ASCII encoding for simple symbols like minus or prime. Such extended encoding is not supported by LaTeX. That was the cause.
Please download and check out the latest version of the plugin.
Thank you very much for your help!
Hi there,
My website just crashed with the following formula:
” (0 – 2,27)^2 + (0 – 2,27)^2 + (0 – 2,27)^2 + (0 – 2,27)^2 + (0 – 2,27)^2 + (1 – 2,27)^2 + (1 – 2,27)^2 + (2 – 2,27)^2 + (2 – 2,27)^2 + (2 – 2,27)^2 + (3 – 2,27)^2 + (3 – 2,27)^2 + (3 – 2,27)^2 + (3 – 2,27)^2 + (3 – 2,27)^2 + (4 – 2,27)^2 + (4 – 2,27)^2 + (4 – 2,27)^2 + (4 – 2,27)^2 + (5 – 2,27)^2 + (5 – 2,27)^2 ”
Replacing ” by the latex tags.
Any ideas?
Hi!
I don’t see any problem with this formula:
I do: http://www.janbroos.nl/
Got this error when activating this formula. Please respond when seen. I solved it by putting the formula out of latex, it is possible but not the best solution.
I see correctly compiled formula on your site. No problems appearing. What do you mean by “error”?
Hey,
Now I do to, strange, I think the server needed time to process or something.
Well thanks!
Hi Pavel,
I found your plugin to be the best latex plugin for wordpress amond al out there.. I am using it in a preliminary technical blog I am keeping for my own bookkeeping purposes. Just wanted to say thanks !
I appreciate your feedback, thanks!
Hi, thank for the plugin,
I have a free hosting which does not allow for cURL, fsock, get_contents… So, I am personally not aware of any other methods to get a contents of an external file. So, what do you think, is it possible to provide another way to put formula images from your website on pages?
For example, http://www.quicklatex.com/image/latex.f?formula=... or http://www.quicklatex.com/latex.f?image&formula=... or something like that.
If there is an error in the formula, well, you can just place an error sign without explanation, it is not really a problem (not the one I would care about). The only real problem I see is that the image is supposed to be shifted depending on the base line. I don’t think there is any way to provide this information with image only, but one way to solve this would be to make a constant shift for all images (something like a maximum shift for all symbols). Maybe there is another better way?
Is it possible to use the align environment from amsmath? I tried using [math]\begin{align*} etc., but it causes an error.
I’m afraid no. QuickLatex treats all formulas in inline mode, but {align} needs to be used in display mode.
Any chance of you adding display mode as an option then? I know I can fudge a single equation with $\displaystyle…$ but anything involving multiple lines can’t be done, at least not with proper alignment.
Hi, excellent tool. Especially cacheing and line aligment!
I’m in progress of building Google Wave Gadget for writing mathematical formulas live in documents cooperativelly edited by multiple persons in the same time.
I have working prototype of tex part here:
http://smp.if.uj.edu.pl/~baryluk/tex-wave/texwave.html
I was wondering about any possible UI enhancments, so it will be easier to use.
I have many performance improvments in my mind, especially to not generate excessive load on quicklatex server. I already implemented few of them.
What is interesting the if I put additionall $ $ in formula= GET parameter, my formulas renders as display-math mode (not just inline mode)
Hi again.
Is there possibility of changing maximal width of produced gif? becuase currently
QuickLatex wraps long formulas into multiple lines. It is generally very good,
but sometmes, i have text of different width, and it looks pretty ugly.
Other solution will also be to emit two gif, one for first n-1 rows, and second for n’th
row (which could be smaller than the width of all previous rows), becuase currently
last row have big empty space which isn’t filled by text.
Any ideas?
Another idea is to generate PNG file instad of GIF. PNG have better support for transparency (alpha channel), making quicklatex images look better on non-white background, and still having very smooth output.
I also think that having different size of output (for example 200% can be usefull),
for example when making full-screen presentation in HTML.
Hi Witold!
I am very grateful for your supportive feedback and great ideas. Thank you!
I’ve played with your application – I think it is outstanding idea and thank you for choosing QuickLaTeX for your project.
As for display mode math, extended gif width, image scaling – they all are in my schedule for development. I’ll add these features in the future. I cannot promise to do this very soon but I’ll do my best.
Now you can magnify images by setting font size in the formula code (ex. \Large, \HUGE, etc.)
I decided to use GIF instead of PNG because IE doesn’t support transparent PNG well.
Keep me updated on your project progress and other suggested features.
All the best.
Firstly, Great Plugin!
One thing I’d like to see is support for the \LaTeX tag, which doesn’t seem to work for me. Anyway to include the proper typesetting of LaTeX?
Thanks, Chris
Try \textrm{\LaTeX}
Hi!
I have been using yout tool for half a year now. At the moment 13786 generated images represent all the formula in a nice way, thanks for your work
One thing that is bugging me though is the printable version of the articles. The images are rendered in a very low resolution, making them fit in 72dpi text on the screen. When you print them, these low-res images are scaled up. Due to this they look quite ugly and are often hard to read.
Magnifying the images by setting font size in the formula code can not solve the problem, because I don’t want to have bigger images in the online-version.
Is there any chance to solve this?
Hi!
I use quicklatex but there is something that bored me. In the page
http://www.ahmath.com/?page_id=99
the size of the font of quicklatex is bigger than the normal text. How can i get rid of this problem.
You can use LaTeX commands to control font size: \tiny \scriptsize \footnotesize \small, etc.
Font size commands don’t work in math environment. And they don’t work (for me) in QuickLatex environment either. Some math packages have special font size commands; do you implement any?
So, how can i use any of the LaTex commands
\tiny \scriptsize \footnotesize \small \normalsize \large \Large \LARGE \huge \Huge
in this sample expression:
Could you please write the new expression with any of the LaTex commands (\tiny \scriptsize \footnotesize \small \normalsize \large \Large \LARGE \huge \Huge) included..
Along the lines of changing font sizes, but more subtle: QuickLaTeX output is about 10% too big for the font on my page. I can make it look OK if I set body{font-size:110%;}, but my font is already too large; I’d like to drop it to about 90%. This would require QuickLaTeX to be scaled to about 80%.
I would like to suggest a percentage scale parameter (_not_ font size) to be made available, as an global parameter in the setup, and as a parameter in the individual [latex] block, with 100 being your current size, so the graphic would be created at that scale factor. (I think these two settings should be cumulative, so the overall document could be scaled using the global parameter, and then special uses (footnotes, for example) could be locally scaled with the individual parameter.)
Of course, there’s a possibility of placing an ImageMagick filter which would scale all images as they are placed in ql-cache, but that’s much trickier to do at our end than at quicklatex.com. I think this should be fairly straightforward to implement.
QuickLaTeX aligns with HTML text better than any other (including TeX4ht). If the size were precisely adjustable it would be absolutely the best.
It would be better if quicklatex.com were to provide this scaling as I described, but here is an immediate workaround for anyone interested –let the plugin wp-quicklatex.php do it for you:
Around line 178, just inside “if ($status == 0) {“, and just above “out_str =”, add the lines
$image_width = ""; //Set a CSS error, in case no cache -- no width will be set
if(is_file($image_full_path))
{
$image_size = getimagesize($image_full_path);
$image_width = floor(($image_scale*$image_size[0]+50)/100);
$image_align = floor(($image_scale*$image_align+50)/100);
}else{
$image_width = ""; //Set a CSS error, in case no cached file -- width will no be affected
}
In the following line, between px; and border, add
width:".$image_width."px;
And, at the beginning of function ql_kernel(), initialize
$image_scale = 100;
(or, better, to a constant IMAGE_SCALE which is defined at the top of this file). This can be set to whatever is correct for your font; 100 leaves things unchanged. If a syntax for setting scale in the [latex] quickcode is developed, this value can be changed for that individual case between initialization and use.
If the ql-cache is not available, there will be no scaling — just as is now.
If this were the code, the graphics could be higher resolution (and higher quality compression), say double-size, with a hidden 50% factor in the code.
Some new coding would allow the scale of the graphic to vary with the scale of the text when that is set by the browser, giving an improvement in visual accessibility.
quicklatex.com is sort of down. It seems to respond to cached expressions (a few simple ones that must have occurred earlier) but nothing else. \Sigma works; {\Sigma} does not. Nor does a+z. It has been down about 24 hours.
Another reason why the script should be released for local installation for critical uses.
Glad it’s working again!
Pavel, could you document for us what “LaTeX” means in QuickLaTeX? That is, what tex/latex commands, environments, packages are you serving? There is no error reporting, just failure, so without the “rules” it’s hard to guess what to do to make things work (or even what to try to do).
I much prefer the appearance of QL to mimetex — but mimetex does a lot of things that I can’t get QL to do. Check out the examples at http://www.forkosh.com/mimetex.html — most don’t work in QL. The reason I’m comparing QL with mimetex (and not with others), is that mimetex is the only other system (that I’m aware of) that allows vertical alignment.
I’d really appreciate the requested information — I think it would be very useful to anyone trying to use QL. Thanks.
Hi Kim!
Thank you for helping me out with answering all the questions!
Currently QL supports such packages: amsmath, amsfonts, amssymb.
I would gladly add support for any other packages you might need, just let me know.
Any other suggestions, feature requests, etc. are welcome too.
I have pretty huge todo list for the QL. But I have very little time to implement them.
I would really appreciate if someone would help me in the development of QL.
As for “Can’t create dvi file” message – it means that unknown error occurred, which is not related to the correctness of your latex code. QL would give explanatory error message otherwise. So if you see such message – please let me know instantly – something wrong with the server.
Thanks.
Hello. Thanks for your great service, I intend to use it a lot.
I have a question however; wouldn’t it be better for us and for you, if the wordpress plugin saves the image on our webserver rather than link to your webserver? That way I am sure that my equations won’t disappear in case your service breaks down, and you will have lower cost with hosting it.
Feel free to email me about this. I am willing to help with this if needed.
@Benjamin
It does — it saves the images in wp-content/ql-cache (make sure it exists and is writable).
Ah I see.
I’ll just check my permissions on the folder then
Disregard my comment, and thanks for clearing it up
Is the server down again? New formula have not been parsed since Monday…
Am I the only one with this problem?
Yay, it’s working again
I’m not entirely sure why, but WP QuickLaTeX makes my RSS feed timeout if I install it. Is this a known issue?
Ah, I geddit. The ql-cache directory didn’t exist. Cheers!
Nice plugin, but on black background looks awful.
Thanks Pavel. I’m using the LaTeX WordPress plugin on my blog. It looks great.
Thank you for using it!
Dear Pavel, thanks for a great plugin. It seems to work well on a few simple examples I’ve tried.
Thank you very much for your nice plugin.
I have changed my WP to version 3.0.
Since then the plugin has not worked.
When I defiine a new command, the tex image seems not to be created.
Please help me.
Thank you for your feedback!
Please try now – everything should work ok.
hi

would you show a few examples, see what I got:
the result in no 1.
http://www.pdhsource.com/quiz-1115/
see how the (3/2) starts fine then drops, it should be all in the power line.
any advice
same thing in no 12 in the page link above
tx
am using
in the example above.
sorry, the [math\ tag is used above
@hisham
The result is correct. For what I suspect you want, you need curly brackets around the exponent:
^{(3/2)}
That is just basic TeX/LaTeX — has nothing to do with QuickLaTeX.
tx Kim, works fine
is there any where i can read or see few examples for future issues.
hisham
If you are primarily using insertions into HTML (like QuickLaTeX), most of LaTeX is irrelevant. Do a web search on “latex math expression help”. Google gave me about a dozen useful links right at the top.
7 Trackbacks
[...] (which happens to be a good approximation of the response function of simple cells in the primary visual cortex of the brain) Well, the fact that WordPress plugins are a major reason I chose to use WordPress to create this site. In particular, I chose the QuickLaTeX plugin availible here. [...]
[...] mendapatkan plugin WP-QuickLatex ini, silakan kunjungi situs si pembuatnya di http://www.holoborodko.com atau melalui plugin search yang ada di dashboard WordPress [...]
[...] mendapatkan plugin WP-QuickLatex ini, silakan kunjungi situs si pembuatnya di http://www.holoborodko.com atau melalui plugin search yang ada di dashboard WordPress [...]
[...] WP QuickLaTeX lets me write math that doesn’t look like garbage. [...]
[...] some strange topics on this blog, specially now that blog this supports Latex formulas using the WP-QuickLaTeX [...]
[...] Powered by QuickLaTeX.com” and QuickLaTeX as a WordPress plugin. [...]
[...] Powered by QuickLaTeX.com” and QuickLaTeX as a WordPress plugin. [...]