Math - LATEX

Mods, snippets and styles postet and supported by the users
Forum rules
As the forum title says this is for User Contributions
Post a support request in this forum and you will be banned!
Locked
Chico Gois
BBCoder II
BBCoder II
Posts: 10
Joined: 08 Mar 2010, 17:00
Contact:

Math - LATEX

Post by Chico Gois »

For those who need to post mathematical formulas, I found this tip and resource that can be read in full at this address http://www.codecogs.com/pages/forums/pa ... hp?id=1682

Basically this is the changes:

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>
Below are the instruction on how to install the BBCode, therefore it is similar for both styles:

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]Your equation[/tex]
Demo:
bi.gif
bi.gif (1.01 KiB) Viewed 4817 times
Or my board:

http://www.mundophpbb.com.br/forum/view ... p?f=14&t=8
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Math - LATEX

Post by Stoker »

Looks great :thumb:
Board rules! No PM support
Jessica
BBCoder II
BBCoder II
Posts: 66
Joined: 26 Apr 2010, 01:26
BBCodes: 50
Favourite BBCode: spoilvtitle
Favourite MOD: AJAX Quick Edit
Location: Pennsylvania
Contact:

Math - LATEX

Post by Jessica »

this is PERFECT. use it on my forum, really useful you can type it in the pop up
Locked