Why this LaTeX typing doesn't display?

  • LaTeX
  • Thread starter mcastillo356
  • Start date
  • Tags
    Latex
  • #1
mcastillo356
Gold Member
592
320
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!
 

FAQ: Why this LaTeX typing doesn't display?

Why is my LaTeX code not rendering properly?

There could be several reasons for this issue. Common causes include syntax errors, missing packages, or incorrect document class. Ensure that your LaTeX code is syntactically correct and that all necessary packages are included in the preamble.

Why do I get a "command not found" error in my LaTeX document?

This error typically occurs when you use a command that is not recognized by LaTeX. It might be due to a typo, or you may need to include a specific package that defines the command. Check the documentation for the correct command and required packages.

Why is my LaTeX document not compiling?

Compilation issues can arise from various sources such as missing files, incorrect file paths, or incompatible packages. Review the log file generated during compilation for specific error messages and address them accordingly.

Why are my figures and tables not displaying in LaTeX?

Figures and tables may not display if the file paths are incorrect, the graphics files are missing, or the necessary packages are not included. Ensure that the file paths are correct, the files exist, and you have included packages like \usepackage{graphicx} for images.

Why is my LaTeX math not rendering correctly?

Math rendering issues can be due to syntax errors, missing packages, or incorrect use of math environments. Ensure that you are using the correct math delimiters and have included packages like \usepackage{amsmath} if needed. Double-check the syntax for any errors.

Similar threads

Replies
8
Views
2K
Replies
16
Views
3K
Replies
3
Views
877
Replies
2
Views
1K
Replies
11
Views
5K
Replies
1
Views
4K
Replies
4
Views
3K
Replies
4
Views
4K
Replies
1
Views
2K
Back
Top