This site is READ ONLY!! No support will be given! Everything in here is just for archiving purposes!

Writing equations with LaTeX

Code snippets/ small mods for phpBB3- these can be used to add small but useful features to your forum.
Forum rules
You need to be a registered member to view the topics within this forum ;)
Locked
Chico Gois
Stars
Stars
Posts: 11
Joined: Sun Sep 19 2010 11:53 am
Real name: Chico Gois
Country Flag: Brazil
Location: Brasil - São Paulo - SP
Contact:

Writing equations with LaTeX

Post by Chico Gois »

It is very easy to write mathematical equations using LaTeX, you can write directly the equation or use the equation editor.

Prosilver:

Open: overall_header.html
Find:

Code: Select all

<script type="text/javascript" src="{T_TEMPLATE_PATH}/forum_fn.js"></script>
After, Add:

Code: Select all

<script type="text/javascript" src="http://latex.codecogs.com/editor.js"></script>
Open: posting_buttons.html
Find:

Code: Select all

<input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}"
onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" />
	<!-- END custom_tags -->
After, Add:

Code: Select all

<input type="button" class="button2" onclick="javascript:OpenLatexEditor('message','phpBB','')" value="Equation Editor"/>
SubSilver2:
Open: posting_buttons.html
Find:

Code: Select all

<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
After, Add:

Code: Select all

<script type="text/javascript" src="http://latex.codecogs.com/editor.js"></script>
Find:

Code: Select all

<input type="button" class="btnbbcode" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}"
onclick="bbstyle({custom_tags.BBCODE_ID})"<!-- IF custom_tags.BBCODE_HELPLINE !== '' -->
onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')"<!-- ENDIF --> />
		<!-- END custom_tags -->
After, Add:

Code: Select all

<input type="button" class="btnbbcode" onclick="javascript:OpenLatexEditor('message','phpBB','')" value="Equation
Editor"/>
Find:

Code: Select all

<textarea name="message" rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);"
onkeyup="storeCaret(this);" style="width: 98%;">{MESSAGE}</textarea>
REplace:

Code: Select all

<textarea id="message" name="message" rows="15" cols="76" tabindex="3" onselect="storeCaret(this);"
onclick="storeCaret(this);" onkeyup="storeCaret(this);" style="width: 98%;">{MESSAGE}</textarea>
BBCode:
Uso do BBCode:

Code: Select all

[tex]{TEXT}[/tex]
Html:

Code: Select all

<img style="vertical-align: middle" src="http://latex.codecogs.com/png.latex?{TEXT}"/>
Help line:

Code: Select all

[tex]Sua equação[/tex]
Exemplo:

Code: Select all

[tex]e^x=\sum_{n=0}^\infty\frac{x^n}{n!}[/tex]
Demo:
soma.png
Fonte: http://www.codecogs.com/pages/forums/pa ... hp?id=1682
You do not have the required permissions to view the files attached to this post.
Chico Gois
Sorry my bad english...
Locked