Welcome to our community

Be a part of something great, join today!

Render while posting

ZaidAlyafey

Well-known member
MHB Math Helper
Jan 17, 2013
1,667
I don't know weather you guys know about Mathematics Stack Exchange . It has a beautiful feature . It renders the code while you are posting so you can see if there are any mistakes right away . Can we have it in the near feature ?
 

Jameson

Administrator
Staff member
Jan 26, 2012
4,052
This is something I will definitely look into and test out. If it doesn't affect anything else negatively then I don't see why it isn't a good idea. :)
 

Ackbach

Indicium Physicus
Staff member
Jan 26, 2012
4,197
I'm on M.SE, and I actually find this feature annoying. Practically every character you type changes things from being good $\LaTeX$ code to being bad code, so your preview window flickers constantly while you type.
 

Fantini

"Read Euler, read Euler." - Laplace
MHB Math Helper
Feb 29, 2012
342
I believe this feature would be useful if we had the option to press a button and it rendered then. Constant and automatic rendering is a pain as much as having to constantly preview the post to check. GmailTeX and the likes have built-in mechanisms that enable that. Would that be possible here? :D

Cheers!
 

Ackbach

Indicium Physicus
Staff member
Jan 26, 2012
4,197
I believe this feature would be useful if we had the option to press a button and it rendered then. Constant and automatic rendering is a pain as much as having to constantly preview the post to check. GmailTeX and the likes have built-in mechanisms that enable that. Would that be possible here? :D

Cheers!
Well, to some extent, you have that with the Preview Post button. That will render any $\LaTeX$ that you've coded up so far.
 

Deveno

Well-known member
MHB Math Scholar
Feb 15, 2012
1,967
A possible compromise:

typing [/math] generates a refreshed preview....
 

Fantini

"Read Euler, read Euler." - Laplace
MHB Math Helper
Feb 29, 2012
342
I believe this feature would be useful if we had the option to press a button and it rendered then. Constant and automatic rendering is a pain as much as having to constantly preview the post to check. GmailTeX and the likes have built-in mechanisms that enable that. Would that be possible here? :D

Cheers!
I know Ackbach. I've highlighted that part on my post. Point is, that also takes quite long. The examples I gave are about instantaneous. Even though previewing posts allow for that, it takes quite longer than if we were to render a small line of code. Reloading all the images, mathjax and the rest makes previewing considerably less appealing if this option were available. :D

Cheers!
 

Jameson

Administrator
Staff member
Jan 26, 2012
4,052
I have found a way to sort of make this work, but it still needs time to tweak. The idea of having a live preview box that copies everything you write and renders math equations instantly doesn't sound appealing to me because of wasted space. What we can do though is have a smaller test box next to the main textbox we all use to make posts that will instantly render all LaTeX that is put in it. This would mean that it wouldn't be necessary to reload the page several times each post to check syntax.

Does that sound appealing to those who liked a similar idea?
 

dwsmith

Well-known member
Feb 1, 2012
1,673
I have found a way to sort of make this work, but it still needs time to tweak. The idea of having a live preview box that copies everything you write and renders math equations instantly doesn't sound appealing to me because of wasted space. What we can do though is have a smaller test box next to the main textbox we all use to make posts that will instantly render all LaTeX that is put in it. This would mean that it wouldn't be necessary to reload the page several times each post to check syntax.

Does that sound appealing to those who liked a similar idea?
No one should need to check several times. If you type the question up fully, render once, and fix the errors, you only clicked preview once and then post.
 

Jameson

Administrator
Staff member
Jan 26, 2012
4,052
No one should need to check several times. If you type the question up fully, render once, and fix the errors, you only clicked preview once and then post.
Well I would bet money that even if that's what members should do, a non-negligible percent of them check more than once. I could see situations when checking syntax in smaller chunks makes identifying the error more quickly than going back through a long string where the line/col location of the error isn't given. Also, some people proof read in stages and others wait until the end. I want to make all methods easier whenever possible so I still hope to hear that there is interest in a dynamic syntax checker.
 

dwsmith

Well-known member
Feb 1, 2012
1,673
Well I would bet money that even if that's what members should do, a non-negligible percent of them check more than once. I could see situations when checking syntax in smaller chunks makes identifying the error more quickly than going back through a long string where the line/col location of the error isn't given. Also, some people proof read in stages and others wait until the end. I want to make all methods easier whenever possible so I still hope to hear that there is interest in a dynamic syntax checker.
Has the line location ever been correct in offline LaTeX? I know mine never is. It just gives ruff estimates.
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
Well I would bet money that even if that's what members should do, a non-negligible percent of them check more than once. I could see situations when checking syntax in smaller chunks makes identifying the error more quickly than going back through a long string where the line/col location of the error isn't given. Also, some people proof read in stages and others wait until the end. I want to make all methods easier whenever possible so I still hope to hear that there is interest in a dynamic syntax checker.
In long posts, I check several times as it is easier for me to then locate the errant line(s) near the bottom of the post. Having a dynamic syntax checker would be a great time saver and I would welcome such a feature. (Wink)
 

anemone

MHB POTW Director
Staff member
Feb 14, 2012
3,756
I have found a way to sort of make this work, but it still needs time to tweak. The idea of having a live preview box that copies everything you write and renders math equations instantly doesn't sound appealing to me because of wasted space. What we can do though is have a smaller test box next to the main textbox we all use to make posts that will instantly render all LaTeX that is put in it. This would mean that it wouldn't be necessary to reload the page several times each post to check syntax.

Does that sound appealing to those who liked a similar idea?
That dynamic syntax checker sounds great to me, because it can get tiring to check for multiple times whether the LaTeX renders as it should by previewing it!(Malthe)
 

Bacterius

Well-known member
MHB Math Helper
Jan 26, 2012
644
No one should need to check several times. If you type the question up fully, render once, and fix the errors, you only clicked preview once and then post.
Not everyone types up their entire post in a single, uninterrupted run. Some of us actually like to, you know, preview from time to time to take a mental break, review what we've written so far and if the structure of the post makes any sense, proofread individual paragraphs, and of course fix the occasional LaTeX typo. Just because you don't do it that way doesn't imply nobody does.
 

ZaidAlyafey

Well-known member
MHB Math Helper
Jan 17, 2013
1,667
No one should need to check several times. If you type the question up fully, render once, and fix the errors, you only clicked preview once and then post.
When you write a lots of equations and each one depends on the previous one you will most probably use cope and paste many times. This will create many problems if you pasted a wrong syntax.

What I usually do, I write the code using MSE then copy it to anywhere else.
 

dwsmith

Well-known member
Feb 1, 2012
1,673
Not everyone types up their entire post in a single, uninterrupted run. Some of us actually like to, you know, preview from time to time to take a mental break, review what we've written so far and if the structure of the post makes any sense, proofread individual paragraphs, and of course fix the occasional LaTeX typo. Just because you don't do it that way doesn't imply nobody does.
When you write a lots of equations and each one depends on the previous one you will most probably use cope and paste many times. This will create many problems if you pasted a wrong syntax.

What I usually do, I write the code using MSE then copy it to anywhere else.
Thanks for the lecture. It seems that you both think I use LaTeX very sparingly. Well that is far from the case.

However, here is something to note. When your LaTeX documents run in excess of a handful of pages, compiling every few minutes when on page 60 can take a while even if you break up the main document into chapters, sections, etc. since they can be 20+ pages. I know this from experience and not from just one experience many.

One huge advantage we have here is that self contained environments, think align, won't compile but the rest will. Therefore, when one self contained block is jacked up, you know where to focus your search efforts. So those errors are easier to find and fix.
 

Bacterius

Well-known member
MHB Math Helper
Jan 26, 2012
644
Thanks for the lecture. It seems that you both think I use LaTeX very sparingly. Well that is far from the case.

However, here is something to note. When your LaTeX documents run in excess of a handful of pages, compiling every few minutes when on page 60 can take a while even if you break up the main document into chapters, sections, etc. since they can be 20+ pages. I know this from experience and not from just one experience many.
That's a strawman, forum posts aren't 60 pages long. If you're writing a report, thesis, or a very long document, you generally break it up into distinct chapters, work on them individually, and merge them together at the end before final proofreading, it's both faster and easier to maintain. But that is not relevant to forum posts (the topic at hand) which are generally a couple pages long at most, typically less than half a page, and typically people start breaking them up into multiple posts when they get too long anyway.
 

dwsmith

Well-known member
Feb 1, 2012
1,673
That's a strawman, forum posts aren't 60 pages long. If you're writing a report, thesis, or a very long document, you generally break it up into distinct chapters, work on them individually, and merge them together at the end before final proofreading, it's both faster and easier to maintain. But that is not relevant to forum posts (the topic at hand) which are generally a couple pages long at most, typically less than half a page, and typically people start breaking them up into multiple posts when they get too long anyway.
You need to take in the whole comment not just a piece to understand the meaning. The point here is it so short and the compiler is more forgiving then a regular compiler that you can do this in only one preview if you are good with LaTeX. Are you saying you still don't have a good grasp of LaTeX?