LaTeX What to do when you can't get Latex formatted correctly?

  • Thread starter Thread starter find_the_fun
  • Start date Start date
  • Tags Tags
    Latex
AI Thread Summary
When encountering a LaTeX error, it's essential to check for matching opening and closing braces, as this is a common source of issues. Utilizing the preview function can help ensure that the code displays correctly before submission. Breaking down complex equations into simpler components can also aid in identifying mistakes. Adding spaces in the code can improve readability and may help with rendering issues. For those seeking a lightweight LaTeX editor for Windows, recommendations are welcome, as typing long equations can be challenging. Additionally, if errors persist and cannot be resolved, using the report tool to alert a moderator may be appropriate.
find_the_fun
Messages
147
Reaction score
0
What should one do when they cannot solve a Latex error? Should the report tool be used to get the attention of a moderator?

Also, can anyone recommend a light weight Latex editor for Windows? It can be quite challenging to type in long and complex equations.
 
Physics news on Phys.org
Re: What to do when can't get Latex formatted correctly?

After seeing the $\LaTeX$ error in your DiffEq topic, and having seen this many times myself, I can safely say that you probably do not have matching opening and closing braces. In my experience, the error has always been on my part, and it just takes going through the code to fix my mistake. I highly recommend using the preview function to make sure your code displays as you intend before submitting your post.
 
Re: What to do when can't get Latex formatted correctly?

I just wrote out a super long post where I tried to generalize approaching syntax with levels or layers in mind, but I think that idea is easy enough not to go crazy with examples now.

Start by replacing the trig expressions with A and B and you'll be left with a much easier line to scan. Once you get the form correct for A and B add back in the trig stuff. Once you establish that some step is working properly, you know immediately when you mess up as you work.

You could count opening brackets and closing brackets and hope that adding one or deleting one will even things out but that's a bit too random for me. It's better I think to approach the code in a few pieces so mistakes are never that time-wasting.
 
Re: What to do when can't get Latex formatted correctly?

I want show codecogs
by formula
Code:
 $\displaystyle \sum_{k=1}^{n-1}\sin\left(\frac{\left(2\left\lfloor\sqrt{kn}\right\rfloor+1\right)\pi}{2n}\right)=\cot\left(\frac{\pi}{2n}\right)\cos\left(\frac{\pi}{2n}\right)$

but no preview :(

$\displaystyle \sum_{k=1}^{n-1}\sin\left(\frac{\left(2\left\lfloor\sqrt{kn}\right\rfloor+1\right)\pi}{2n}\right)=\cot\left(\frac{\pi}{2n}\right)\cos\left(\frac{\pi}{2n}\right)$
 
Re: What to do when can't get Latex formatted correctly?

hxthanh said:
I want show codecogs
by formula
Code:
 $\displaystyle \sum_{k=1}^{n-1}\sin\left(\frac{\left(2\left\lfloor\sqrt{kn}\right\rfloor+1\right)\pi}{2n}\right)=\cot\left(\frac{\pi}{2n}\right)\cos\left(\frac{\pi}{2n}\right)$

but no preview :(

$\displaystyle \sum_{k=1}^{n-1}\sin \left(\frac{\left(2\left\lfloor\sqrt{kn} \right\rfloor+1\right)\pi}{2n}\right)=\cot\left( \frac{\pi}{2n} \right)\cos\left(\frac{\pi}{2n}\right)$

You need to add in a space every so often with Mathjax. I added in some random spaces along the way and now it renders fine. :)

\displaystyle \sum_{k=1}^{n-1}\sin \left(\frac{\left(2\left\lfloor\sqrt{kn} \right\rfloor+1\right)\pi}{2n}\right)=\cot\left( \frac{\pi}{2n} \right)\cos\left(\frac{\pi}{2n}\right)
 
Re: What to do when can't get Latex formatted correctly?

Jameson said:
You need to add in a space every so often with Mathjax. I added in some random spaces along the way and now it renders fine. :)

\displaystyle \sum_{k=1}^{n-1}\sin \left(\frac{\left(2\left\lfloor\sqrt{kn} \right\rfloor+1\right)\pi}{2n}\right)=\cot\left( \frac{\pi}{2n} \right)\cos\left(\frac{\pi}{2n}\right)

I kinda feel like you should add spaces in LaTeX code either way, just for the sake of readability.. I know I, like other people, occasionally right-click to see how an equation was written.​
 

Similar threads

Replies
12
Views
3K
Replies
6
Views
3K
Replies
4
Views
4K
Replies
16
Views
4K
Replies
2
Views
6K
Replies
3
Views
2K
Replies
1
Views
3K
Back
Top