Why this LaTeX typing doesn't display?

  • LaTeX
  • Thread starter mcastillo356
  • Start date
  • Tags
    Latex
  • #1
mcastillo356
Gold Member
570
280
Hi PF
I've been for a while taking a glance to recent posts of mine, in search for right or wrong LaTeX performance; everything correct, except for this thread:

https://www.physicsforums.com/threa...n-understanding-different-approaches.1056106/

The following typing has not worked

$$=\frac{1}{2}\ln{|u-1|}-\frac{1}{2}\ln{|u+1|}$$

Where is the mistake?

Regards
 
Physics news on Phys.org
  • #2
What equals?
 
  • Love
Likes mcastillo356
  • #3
$$x=\frac{1}{2}\ln{|u-1|}-\frac{1}{2}\ln{|u+1|}$$
 
  • Like
Likes mcastillo356
  • #4
mcastillo356 said:
Hi PF
I've been for a while taking a glance to recent posts of mine, in search for right or wrong LaTeX performance; everything correct, except for this thread:

https://www.physicsforums.com/threa...n-understanding-different-approaches.1056106/

The following typing has not worked

$$=\frac{1}{2}\ln{|u-1|}-\frac{1}{2}\ln{|u+1|}$$

Where is the mistake?

Regards
You cannot use colors in formulas.
 
  • Like
Likes mcastillo356
  • #5
fresh_42 said:
You cannot use colors in formulas.
One can use colours in a formula, provided one states it explicitly using the ##\rm{LaTeX}## command, rather than choose a different colour for some part of the formula only from the drop down menu that's available in physicsforum's writing space.

For example : I can correctly type ##a\color{red}{+}b.\quad## I typed ##\quad\texttt{##a\color{red}{+}b}##.##

Try writing the same choosing the + only in red from the drop-down color menu here and you'd get incoherent compiling from the editor. I don't know why it happens though.

Let me do it here to the right. ##a+b##.

See what I got above. 👆🤷‍♂️. It didn't compile and the LaTeX math declarations are visible!



Of course if you don't use ##\rm{LaTeX}## for it, you're fine. For instance, (a+b) comes out alright.
 
Last edited:
  • #6
I would encourage you not use the fanciest of features:
  1. They are less tested and therefore more likely to break
  2. They may make the message less accessible to the visually impaired
  3. It usually is better to spend more time formulating the words of your post that formatting of the equations.
 
  • Like
Likes mcastillo356 and berkeman
  • #7
brotherbobby said:
Try writing the same choosing the + only in red from the drop-down color menu here and you'd get incoherent compiling from the editor. I don't know why it happens though.

LaTeX rendering is an optional extension of the software. I doubt that standard UI elements - such as those for text formatting - have been modified to parse the entire draft in order to determine whether they should be inserting phpBB or LaTeX commands in the particular case.
 
  • #8
mcastillo356 said:
The following typing has not worked

$$=\frac{1}{2}\ln{|u-1|}-\frac{1}{2}\ln{|u+1|}$$
This works:
$$=\frac{1}{2}\ln|u-1|-\frac{1}{2}\ln|u +1|$$

Mixing BBCode (for example [ COLOR]) in LaTeX expressions fouls up the LaTeX rendering.

Incidentally, for simple fractions like 1/2 you don't need to use braces around each digit. By "simple" I mean each part is a single character. In other words, this will work \frac 1 2, but this won't \frac 1 10.
Also, don't use braces around function arguments. For example, use \ln(|x + 1|) or \ln|x + 1|but not \ln{|x + 1|}. The latter doesn't cause problems, but it's just extra cruft that you don't need to type.
 
Last edited:
  • #9
brotherbobby said:
One can use colours in a formula, provided one states it explicitly using the ##\rm{LaTeX}## command, rather than choose a different colour for some part of the formula only from the drop down menu that's available in physicsforum's writing space.
The dropdown menu inserts BBCode markup, which doesn't play well with LaTeX.

Vanadium 50 said:
It usually is better to spend more time formulating the words of your post that formatting of the equations.
Amen!
 

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
466
  • MATLAB, Maple, Mathematica, LaTeX
Replies
16
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
1K
Replies
14
Views
2K
Replies
8
Views
663
Back
Top