Clan x86

General Forums => Academic / School => Topic started by: Sidoh on October 05, 2006, 10:51:16 pm

Title: PHP LaTeX Rendering
Post by: Sidoh on October 05, 2006, 10:51:16 pm
\displaystyle W_{1\rightarrow2} = \int_{x_1}^{x_2}F_x\left(x\right)dx

Into this!

(http://latex.sidoh.org/?render64=XGRpc3BsYXlzdHlsZSBXX3t4XzFccmlnaHRhcnJvdyB4XzJ9ID0gXGludF97eF8xfV57eF8yfUZfeFxsZWZ0KHhccmlnaHQpZHg=)

Some other examples

(http://latex.sidoh.org/?render64=XGRpc3BsYXlzdHlsZSBcaW50IHhebj1cZnJhY3t4XntuKzF9fXtuKzF9)
\displaystyle \int x^n=\frac{x^{n+1}}{n+1}

(http://latex.sidoh.org/?render64=XGRpc3BsYXlzdHlsZSBcZnJhY3tkfXtkeH14Xm49bnhee24tMX0=)
\displaystyle \frac{d}{dx}x^n=nx^{n-1}

You can also pass ?render=<LaTeX> to latex.sidoh.org/ to produce an image.  Navigating to latex.sidoh.org without any parameters will redirect you to the "UI."

Notes / Tips --

Title: Re: PHP LaTeX Rendering
Post by: d&q on October 06, 2006, 12:33:48 am
This will be really helpful at school, thank you!  :-*
Title: Re: PHP LaTeX Rendering
Post by: rabbit on October 06, 2006, 08:43:51 am
There needs to be manual page with all the options.
Title: Re: PHP LaTeX Rendering
Post by: rabbit on October 06, 2006, 08:44:50 am
You should also tell me how to display stuff like function pi and congruence.
Title: Re: PHP LaTeX Rendering
Post by: Sidoh on October 06, 2006, 12:17:55 pm
There needs to be manual page with all the options.

It's LaTeX (http://ctan.tug.org/tex-archive/info/lshort/english/lshort.pdf)...

You should also tell me how to display stuff like function pi and congruence.

(http://latex.sidoh.org/?render=%5Ccong) \cong

(http://latex.sidoh.org/?render=%5Cdisplaystyle+%5Cprod_%7Bi%3Dm%7D%5E%7Bn%7D) \displaystyle \prod_{i=m}^{n}
Title: Re: PHP LaTeX Rendering
Post by: Sidoh on October 10, 2006, 05:05:58 pm
I've been playing around with it for the last few days and you can do some pretty neat things!

Code: [Select]
$$Surface area and volume of a sphere
$\displaystyle \\* \indent V_{sphere}=\frac{4}{3}\pi r^{3} \\
 \indent A_{sphere}=4\pi r^{2}$

$\\$ Volume of a cone
$\displaystyle \\* \indent V_{cone}=\frac{1}{3}\pi r^{2}h

$\\$ Volume of a cylinder
$\displaystyle \\* \indent V_{cylinder}=\pi r^2 h$$
(http://latex.sidoh.org/?render64=JCRTdXJmYWNlIGFyZWEgYW5kIHZvbHVtZSBvZiBhIHNwaGVyZQ0KJFxkaXNwbGF5c3R5bGUgXFwqIFxpbmRlbnQgVl97c3BoZXJlfT1cZnJhY3s0fXszfVxwaSByXnszfSBcXA0KIFxpbmRlbnQgQV97c3BoZXJlfT00XHBpIHJeezJ9JA0KDQokXFwkIFZvbHVtZSBvZiBhIGNvbmUNCiRcZGlzcGxheXN0eWxlIFxcKiBcaW5kZW50IFZfe2NvbmV9PVxmcmFjezF9ezN9XHBpIHJeezJ9aA0KDQokXFwkIFZvbHVtZSBvZiBhIGN5bGluZGVyDQokXGRpc3BsYXlzdHlsZSBcXCogXGluZGVudCBWX3tjeWxpbmRlcn09XHBpIHJeMiBoJCQ=)

Code: [Select]
$$Trigonometric identities
$\\ \indent \cos^{2}{\theta}+\sin^{2}{\theta}=1
 \\ \indent 1+\tan^{2}{\theta}=\sec^{2}{\theta}
 \\ \indent \cot^{2}{\theta}+1=\csc^{2}{\theta}$

$\\$
Double-angle formulas
 $\\ \indent \sin{2\theta}=2\sin{\theta}\cos{\theta}
  \\ \indent \cos{2\theta}=\cos^{2}{\theta}-sin^{2}{\theta}$

$$

(http://latex.sidoh.org/?render64=JCRUcmlnb25vbWV0cmljIGlkZW50aXRpZXMNCiRcXCBcaW5kZW50IFxjb3NeezJ9e1x0aGV0YX0rXHNpbl57Mn17XHRoZXRhfT0xDQogXFwgXGluZGVudCAxK1x0YW5eezJ9e1x0aGV0YX09XHNlY157Mn17XHRoZXRhfQ0KIFxcIFxpbmRlbnQgXGNvdF57Mn17XHRoZXRhfSsxPVxjc2NeezJ9e1x0aGV0YX0kDQoNCiRcXCQNCkRvdWJsZS1hbmdsZSBmb3JtdWxhcw0KICRcXCBcaW5kZW50IFxzaW57Mlx0aGV0YX09MlxzaW57XHRoZXRhfVxjb3N7XHRoZXRhfQ0KICBcXCBcaW5kZW50IFxjb3N7Mlx0aGV0YX09XGNvc157Mn17XHRoZXRhfS1zaW5eezJ9e1x0aGV0YX0kDQoNCiQk)

Code: [Select]
$$\begin{center} {\bf Chain Rule} \end{center} \\\\

If $f(u)$ is differentiable at $u=g(x)$ and $g(x)$ is differentiable at $x$, then

$\\ \displaystyle \indent \frac{d}{dx}f(g(x))=f'(g(x))g'(x)
$$

(http://latex.sidoh.org/?render64=JCRcYmVnaW57Y2VudGVyfSB7XGJmIENoYWluIFJ1bGV9IFxlbmR7Y2VudGVyfSBcXFxcDQoNCklmICRmKHUpJCBpcyBkaWZmZXJlbnRpYWJsZSBhdCAkdT1nKHgpJCBhbmQgJGcoeCkkIGlzIGRpZmZlcmVudGlhYmxlIGF0ICR4JCwgdGhlbg0KDQokXFwgXGRpc3BsYXlzdHlsZSBcaW5kZW50IFxmcmFje2R9e2R4fWYoZyh4KSk9ZicoZyh4KSlnJyh4KQ0KJCQ=)
Title: Re: PHP LaTeX Rendering
Post by: Sidoh on April 04, 2009, 03:44:46 am
I threw together a few changes.  I wrote a few lines of mod_rewrite so that you can access renders with a URL that doesn't look like it's dynamic.  This is useful for stupid forums that don't allow dynamically generated images to be embedded.

This is accomplished with the "short" option that appears on the UI now.

Example:
(http://latex.sidoh.org/d65087fc425aa636b0666b11723b9bd5f925556f/image.gif)
( http://latex.sidoh.org/d65087fc425aa636b0666b11723b9bd5f925556f/image.gif )

You can also access the LaTeX that was used to generate the image:
http://latex.sidoh.org/d65087fc425aa636b0666b11723b9bd5f925556f/tex.txt
Code: [Select]
\displaystyle \sum_{i=0}^{\infty}\frac{1}{2^i}=2
nslay, if you read this, let me know of some of the things that you'd specifically like to see working, and I can look into it.

Note that this is separate from the plugin we're currently using for the forum, but if I can get this working nicely without too much effort, we can change that.