Why this LaTeX typing doesn't display?

  • Context: LaTeX 
  • Thread starter Thread starter mcastillo356
  • Start date Start date
  • Tags Tags
    Latex
Click For Summary

Discussion Overview

The discussion revolves around issues related to LaTeX rendering in forum posts, specifically focusing on why certain LaTeX code does not display correctly. Participants explore various aspects of LaTeX usage, formatting, and compatibility with the forum's software.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant questions the correctness of their LaTeX code for a specific mathematical expression and seeks clarification on the mistake.
  • Another participant points out that using colors in formulas is problematic unless done explicitly with the LaTeX command, rather than using the drop-down menu.
  • Some participants suggest that mixing BBCode with LaTeX can lead to rendering issues, and provide examples of what works and what does not.
  • A participant advises against using advanced formatting features due to potential accessibility issues and the likelihood of errors.
  • There are suggestions on simplifying LaTeX code, such as avoiding unnecessary braces around simple fractions and function arguments.

Areas of Agreement / Disagreement

Participants express differing views on the use of colors in LaTeX and the effectiveness of various formatting methods. There is no clear consensus on the best practices for LaTeX rendering in the forum.

Contextual Notes

Participants note that the LaTeX rendering is an optional extension of the forum software, which may not fully support all formatting features, leading to inconsistencies in display.

mcastillo356
Gold Member
Messages
660
Reaction score
364
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
What equals?
 
  • Love
Likes   Reactions: mcastillo356
$$x=\frac{1}{2}\ln{|u-1|}-\frac{1}{2}\ln{|u+1|}$$
 
  • Like
Likes   Reactions: mcastillo356
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   Reactions: mcastillo356
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:
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   Reactions: mcastillo356 and berkeman
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.
 
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:
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

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
998
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
6K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
5K