Questions   
Sort: 
 #5
avatar
+1

Hi Melody,

I think the edit count is a record for me. LOL

 

I was fairly sure I could work around the LaTex rendering error, but every failure also obliterated my code and I was working against the 20-minute editing time limit. I included the LaTex code and an ASCII text solution in case I wasn’t successful.

 

The Problem, the Bug, and the Bug Spray:

 

The < character is a reserved character in HTML. Normally a text editor’s compiler converts this to  “&lt” (no quotes)  for rendering ASCII text, where it’s then displayed as a literal < character.

 

However, a long-time bug in the forum’s editor compiler will treat this as a “start character” for class-tag recognition if there is a non-numeric character immediately following the < sign.  This bug often shows in posts with ASCII text containing a < symbol, but I never had the problem in LaTex code before.

 

The bug causes the complier to look for a class tag, and if this class-tag is not recognized then the compiler deletes the < and everything after it until it reaches the end of the line/paragraph, or until it finds a > symbol, which terminates the class-tag identifier. 

 

Here are some examples that will demonstrate the bug and work around.   (This demonstration works without actually publishing the post.)

Open a new post or a random answer post and paste all the lines of text from the examples below in the editor, then click preview; note that it displays normally; click edit and note the now missing text. if you click preview again, this is what will be displayed if you actually make the post.

 

(These examples are modified so they display normally in this post, but copying them, as described above, will demonstrate the buggy results.)

 

-----------------------

A < B <  C This will display normally in a post.

A<4 B<5 C<6 This will display normally because the character is numeric. 

A<B<C Here, the A remains, but the < (LT) symbol and everything after it disappears up to and including > (GT) symbol, but everything after the > symbol remains.

 

Here X<Y<Z The X remains, but the < symbol and everything after it disappears until the end of the line/paragraph. Which includes all this xxxxxxxxxxxxxxx xxxxxxxxxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxx because it’s all one line/paragraph

Back to normal, here.

 

----------End of examples-------

 

The fix:  a space after the < symbol.

 

I use the spaces in LaTex coding even though LaTex doesn’t require spaces in the code to work properly –in fact, it ignores them (except in text mode). I usually put them in because it makes it easier to read the code. For some reason it corrupted and rendered rubbish. This happened several times. After doubling the spaces the LaTex rendered properly and the compiler code then reduced them to single spaces.   I don’t know why this happened... it seems that computers sometimes have minds of their own.

 

On the bright side, because of the time limit on post editing, I used an injection code to extend the editing time.  Lancelot Link gave me the code and I used it sometimes a few years back when posts were limited to 10 to 15 minutes edit time after publishing. This code extends the editing time to about 90 minutes. 

 

The code still works, and, at least for this post, it works for more than 90 minutes – I just now edited the post at 8 plus hours. I’ll attempt to edit again at 24 hours to see if it still works. I know there is a limit though: A few weeks ago I tried it on some older posts that needed editing; it didn’t work.  Too bad ... it’d be great if I could correct some of my slop. Really Great!

 

GA

--. .-

Nov 2, 2021
Nov 1, 2021

1 Online Users

avatar