Jump to content

Recommended Posts

Posted (edited)

Is it possible to write a short program to search old threads and replace all instances of [latex][/latex] and the dollar sign format with the old math command to repair thousands of older threads? ie search and replace latex with math only when enclosed in [???,]

Edited by Mordred
Posted (edited)

Under Mathjava I wonder if it is possible to include the library file support imports to include the older latex command set? 

 

Might be a better option for older threads. I have been converting some of my older (more commonly referred to posts) ie pinned and unpinned lessons to the new system but there is no way I can fix them all lol

Edited by Mordred
Posted (edited)

Pseudo-code (sort of .NET Framework Managed C++) to search for topics-posts which have code you're interested in:

	for( int i = 0; i < count; i++ )
	{
	 String ^url = String::Format( L"http://www.scienceforums.net/topic/{0}-old-thread-latex-repair-suggestion/", i ); 
	 String ^buffer = System::Net::File:DownloadString( url );
	  if( buffer->IndexOf( L"[latex" ) != -1 )
	  {
	    // log to file that post with index i has tag that you want to find..
	  }
	}
	
Edited by Sensei
Posted (edited)

yeah thats the basic idea. It would be a good idea to repair old threads and less likely to cause loss of membership due to fustration etc etc if the repairs are as transparent as possible to the members with regards to their older threads. Also considering we have numerous readers that never post.... If the older threads are repaired our chances to gain new members would improve .

 

On a positive note the math does look far better once changed. At least judging from the posts I've updated so far. (only ran into a prob with triangledown so far.  

 

Edited by Mordred
Posted (edited)

test

mathType
[math]\nabla  = \Delta [/math]

Codecogs

\Delta =\triangle = \triangledown

[math]\Delta =\triangle = \triangledown[/math]

Sciweavers

 \Delta = \nabla = \triangle

[math] \Delta = \nabla = \triangle [/math]

Edit

Looks just like the mishmash seen on other tech sites these days.

and I have to press refresh page to get mathjax to kick in

Edited by studiot
Posted (edited)

 A very extensive thread of latex errors showing up is here.

You can see numerous errors cropping up.  All of my old posts were done manually under latex.

example here

Simply changing latex to math would work without error in last example though as the crossover works with what is posted.

Going to dig up some of my more complex latex structures.

Edited by Mordred
Posted

Okay, I tweaked our settings and it seems a lot better. We didn't have any of the AMSMath extensions loaded, so a lot of commands weren't available. Also the latex BBCode wasn't working, just the math BBCode.

There are some tabular environments that don't load, but I don't know how that worked in the first place -- everything is in math mode.

Let me know if there are other examples of commands that don't work and I can find which extensions I need to add.

Posted

Excellent it looks like it repaired all my older posts.  When browsing I noticed we also lost support for [imath].

Though I could only find one instance where its used under one of the restricted access forums. I will Pm you link

Posted

not sure if its a previous error or not. Two unknown environment errors.

Huge range of latex in that thread so it gave an excellent range test on equations.

Other threads look way better now. Thanks for the repairs.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.