An exact copy of a working LaTeX code doesn't work?

  • Context: LaTeX 
  • Thread starter Thread starter Fredrik
  • Start date Start date
  • Tags Tags
    Code Latex Work
Click For Summary

Discussion Overview

The discussion revolves around a technical issue with LaTeX code rendering, specifically focusing on the inconsistent display of the symbol \Psi in a forum member's signature. Participants explore potential causes for the rendering problem, including invisible characters and encoding issues.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant notes that the first instance of \Psi does not render correctly, while the second does, leading to confusion about the cause.
  • Another participant suggests the issue might relate to a "50 character bug," but finds this unlikely due to insufficient preceding characters.
  • A participant mentions trying to replace characters in the LaTeX code to troubleshoot the issue, but finds no success in resolving the rendering problem.
  • One participant observes that their browser underlines "si" in the first \Psi, indicating a potential spelling issue.
  • Another participant identifies an "invisible" character between the P and s in the first "Psi," which complicates the rendering and suggests it may be an invalid Unicode character.
  • One participant shares their method of examining the text in a hex editor, confirming the presence of an extra character that is outside the range of valid Unicode characters.
  • There are multiple requests for assistance with LaTeX commands, specifically for rendering h and h bar, indicating a broader interest in LaTeX usage.

Areas of Agreement / Disagreement

Participants generally agree that an invisible character is causing the rendering issue, but there is no consensus on how to resolve it or the exact nature of the character. The discussion includes multiple perspectives on troubleshooting the problem.

Contextual Notes

Limitations include the potential for encoding issues and the presence of invalid characters that may not be easily identifiable in standard text editors.

Who May Find This Useful

Forum members interested in LaTeX formatting, troubleshooting rendering issues, or those dealing with similar technical challenges in mathematical typesetting.

Fredrik
Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Gold Member
Messages
10,876
Reaction score
423
An exact copy of a working LaTeX code doesn't work!?

OK, someone needs to explain this to me, because my head is about to explode. Forum member Jorriss has a LaTeX code in his signature. It includes the LaTeX code \Psi in two places. The second one is displayed correctly. The first one isn't.

My first thought was that this has to be the 50 character bug, but that didn't seem possible, since there wasn't enough stuff before the first \Psi. I got curious, so I did a right-click, "show math as", "TeX commands", and copied the LaTeX code. I typed four dollar signs in the quick reply box, pasted the LaTeX code in the middle, and did a preview. The first \Psi was still messed up. Then I typed the exact same code below the code that doesn't work, and this time it worked.

So now I thought OK, Jorriss must have done something funny here on purpose. Maybe the character that looks like an i isn't really an i, or something like that. So I deleted the character that looked like an i, typed an i, and previewed. It still didn't work. OK, so it's not the i. Then I repeated the procedure with the s, and then the P, and then the \, and it still didn't work! I had replaced all the characters, and it still didn't work.

$$\P​si$$
$$\Psi$$
I have made one observation that may be relevant. My FireFox underlines "si" in the first \Psi, as if it's misspelled, and doesn't underline "si" in any of the other Psis in this post.
 
Physics news on Phys.org


ih\frac{\partial\P si}{\partial{t}}=\hat{H}\Psi

ih\frac{\partial\Psi}{\partial{t}}=\hat{H}\Psi
 


Now if only someone could tell me how to make h, h bar.
 


Jorriss said:
Now if only someone could tell me how to make h, h bar.

\hbar
 


micromass said:
\hbar
Success!

D H said:
ih\frac{\partial\P si}{\partial{t}}=\hat{H}\Psi

ih\frac{\partial\Psi}{\partial{t}}=\hat{H}\Psi

Thank you DH
 


There is an "invisible" character between the P and s in the first "Psi".

If you step the cursor over the text one character at a time with the arrow keys, you need an extra step to get past the invisible character.

FWIW I cut and pasted the text into Notepad, then saved it in Unicode format, then looked at the file in hex. I can see the extra character, but it seems to be something completely invalid - outside the range of valid Unicode characters.
 


micromass said:
In his sig file wrote$$f(T)=\int_{\sigma(T)}f(\lambda) dE_\lambda$$

Dang it ##\mu \text{-mass}##, all that does is remind me about all the stuff I have forgotten since I studied it 50 years ago. :frown:
 


LCKurtz said:
Dang it ##\mu \text{-mass}##, all that does is remind me about all the stuff I have forgotten since I studied it 50 years ago. :frown:

Sowwy :frown: I'll change it.
 


micromass said:
Sowwy :frown: I'll change it.

Of course, you're joking, right? Don't change it.
 
  • #10


AlephZero said:
There is an "invisible" character between the P and s in the first "Psi".

If you step the cursor over the text one character at a time with the arrow keys, you need an extra step to get past the invisible character.

FWIW I cut and pasted the text into Notepad, then saved it in Unicode format, then looked at the file in hex. I can see the extra character, but it seems to be something completely invalid - outside the range of valid Unicode characters.
Thank you. It was driving me nuts. I tried something similar to what you did, after reading your suggestion. The output made me LOL a bit.

Code:
$ echo P​si > foo.txt
$ cat -v foo.txt
PM-bM-^@M-^Ksi
 

Similar threads

  • · Replies 23 ·
Replies
23
Views
4K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 36 ·
2
Replies
36
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 11 ·
Replies
11
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K