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

In summary: P​In summary, Forum member Jorriss has a LaTeX code in his signature. The first \Psi is not displaying correctly, but the second one is. He replaced all the characters and it still didn't work. Then he tried the code below the code that doesn't work and it worked. So he thinks that the character that looks like an i isn't really an i.
  • #1
Fredrik
Staff Emeritus
Science Advisor
Gold Member
10,877
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
  • #2


[itex]ih\frac{\partial\P si}{\partial{t}}=\hat{H}\Psi[/itex]

[itex]ih\frac{\partial\Psi}{\partial{t}}=\hat{H}\Psi[/itex]
 
  • #3


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


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

\hbar
 
  • #5


micromass said:
\hbar
Success!

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

[itex]ih\frac{\partial\Psi}{\partial{t}}=\hat{H}\Psi[/itex]

Thank you DH
 
  • #6


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.
 
  • #7


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:
 
  • #8


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.
 
  • #9


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
 

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

Why is my exact copy of a working LaTeX code not working?

The most likely reason for this is that there may be an error in the code that was not present in the original working version. This could be due to a typo, missing package, or incorrect syntax. It is important to carefully check the code for any errors and compare it to the original working version.

Can a change in LaTeX version affect the functionality of a code?

Yes, a change in the LaTeX version can affect the functionality of a code. This is because new versions of LaTeX may have different syntax or package requirements, which can cause the code to not work as intended. It is important to make sure that the code is compatible with the LaTeX version being used.

Are there any common mistakes that can cause an exact copy of a working LaTeX code to not work?

Yes, there are a few common mistakes that can cause a code to not work. These include incorrect syntax, missing or incorrect package usage, and using incompatible versions of LaTeX. It is important to carefully check the code and ensure that all packages are properly installed.

What steps can I take to troubleshoot my code if it is not working?

If your code is not working, the first step is to carefully check for any errors or typos in the code. You can also try compiling the code on a different LaTeX editor or platform to see if the issue persists. Additionally, checking for compatibility with the LaTeX version being used and consulting online resources or forums for solutions can also help troubleshoot the issue.

How can I prevent my LaTeX code from not working in the future?

To prevent your code from not working in the future, it is important to consistently check for any errors or typos in the code before compiling. Keeping track of any changes made to the code and testing it on different platforms or editors can also help identify and resolve any potential issues. It is also beneficial to stay updated on any changes or updates to LaTeX and its packages.

Similar threads

Replies
23
Views
3K
Replies
12
Views
2K
Replies
6
Views
3K
Replies
36
Views
2K
Replies
7
Views
2K
Replies
11
Views
3K
Replies
3
Views
905
Replies
16
Views
3K
Replies
1
Views
2K
Back
Top