Jump to content

Old thread latex repair suggestion.

Featured Replies

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

  • Author

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

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

  • Author

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

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

  • Author

 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

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.

  • Author

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

Archived

This topic is now archived and is closed to further replies.

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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.