Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 General Discussions
  #1  
Old 12-30-2015, 05:52 PM
dmiyares dmiyares is offline
 
Join Date: Oct 2006
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default LaTex addon for vb5?

Hello:

I've just spun up a new forum for fluid power engineers and right out of the box two users have asked if they can use LaTex with the system. On vB4 there was an addon... wondering if there is such an animal for vB5...

Thank you.
Reply With Quote
  #2  
Old 12-30-2015, 06:11 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can add LaTeX powered by MathJax to your forum by adding their script to your header or headinclude template (I don't use vB5 so I'm not sure which is applicable).

These are the scripts I use:

HTML Code:
<script type="text/x-mathjax-config">
	MathJax.Hub.Config(
	{
		TeX:
		{
			extensions: ["autoload-all.js"],
			noErrors:
			{
				style: {"display": "block !important",
				"margin": "1em 0em 1em 2em",
				"border": "none",
				"text-decoration": "underline"
			}
		},
		Macros: 
		{
			pd: ["{\\frac{\\partial#1}{\\partial#2}}",2],
			d: ["{\\frac{d#1}{d#2}}",2],
			E: ["\\times 10^{#1}",1],
			csch: ["\\mathop{\\rm csch}\\nolimits"],
			arccsc: ["\\mathop{\\rm arccsc}\\nolimits"],
			arcsec: ["\\mathop{\\rm arcsec}\\nolimits"],
			arccot: ["\\mathop{\\rm arccot}\\nolimits"],
			sech: ["\\mathop{\\rm sech}\\nolimits"],
			arsinh: ["\\mathop{\\rm arsinh}\\nolimits"],
			arcosh: ["\\mathop{\\rm arcosh}\\nolimits"],
			artanh: ["\\mathop{\\rm artanh}\\nolimits"],
			arcsch: ["\\mathop{\\rm arcsch}\\nolimits"],
			arsech: ["\\mathop{\\rm arsech}\\nolimits"],
			arcoth: ["\\mathop{\\rm arcoth}\\nolimits"],
		}
	},
	extensions: ["tex2jax.js"],
	jax: ["input/TeX", "output/HTML-CSS"],

	"HTML-CSS": {linebreaks: {automatic: true, width: "90% container"}},
	"SVG": {linebreaks: {automatic: true, width: "90% container"}},
                                  
	displayAlign: "left", displayIndent: "2em", displayErrorAlign: "left",
	tex2jax:
	{
		inlineMath: [['$','$'], ['\\(','\\)']],
		displayMath: [['$$','$$'], ['\\\[','\\\]']],
		processEscapes: true
	}
	});

	MathJax.Hub.Register.StartupHook("TeX Jax Ready",function ()
	{
		MathJax.InputJax.TeX.prefilterHooks.Add(function (data)
		{
			if (data.display)
			{
				var next = data.script.nextSibling;
				while (next && next.nodeName.toLowerCase() === "#text")
				{
					next = next.nextSibling
				}
				if (next && next.nodeName.toLowerCase() === "br")
				{
					next.parentNode.removeChild(next)
				}
			}
		});
	});
</script>

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full"></script>
Once you have that added, then instruct your users to enclose their math expressions in dollar signs (single for inline math and double for displaymode math), or alternately they can use \(\) for inline math and \[\] for displaymode math.

If you want help getting it up and running on your site, send me a PM with login credentials to a temporary admin account, and I will be able to set it up for you.
Reply With Quote
Благодарность от:
Replicant
  #3  
Old 12-30-2015, 08:28 PM
dmiyares dmiyares is offline
 
Join Date: Oct 2006
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow! Thanks for the super fast response. One of the engineers had mentioned mathjax!

-Dave
Reply With Quote
Благодарность от:
MarkFL
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:31 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04752 seconds
  • Memory Usage 2,183KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (2)post_thanks_box_bit
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete