LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Latex Problem: Backslash Recognized as Two Backslashes "doesn't match its definition" (http://www.linuxquestions.org/questions/linux-general-1/latex-problem-backslash-recognized-as-two-backslashes-doesnt-match-its-definition-944098/)

 rm_-rf_windows 05-09-2012 01:12 PM

Latex Problem: Backslash Recognized as Two Backslashes "doesn't match its definition"

Hi all,

I've been struggling for hours with a document that I started in February and that worked in February (I'm pretty sure).

Here's something I've defined:

Code:

\def\node0{hi}
Later on...
Please print \node0 on my PDF!
I get this error:
Quote:
 [2] [3] ! Use of \node doesn't match its definition. l.193 ... Please print \node0 ... ? x
I'm convinced it worked before because I have about 100 of these shortcuts (\def).

At one point I thought it was mistaking \node for \n (change of line) ode. So I substituted wrote \dnode. I even retyped it in completely in case there was a strange character that couldn't not be detected by the naked eye hidden in my text editor.

It's in UTF-8, I'm using gedit. It also indicates MIME type: TeX document (text-x-tex).

If I type in \def\caca1 and then do "caca1", it works.

I suspect it's an encoding problem. I see absolutely no pattern!

Oh, last piece of info... If I do Ctrl+F \node0 I get "doesn't exist". If I copy and paste into the Ctrl+F panel I get "\\node". If I try to replace, it still doesn't work (using Ctrl+H). I just can't figure it out!!

rm

 amani 05-09-2012 10:06 PM

the config/session files may be corrupt. Change editor or delete files.

Quote:
 Originally Posted by rm_-rf_windows (Post 4674408) Oh, last piece of info... If I do Ctrl+F \node0 I get "doesn't exist". If I copy and paste into the Ctrl+F panel I get "\\node". If I try to replace, it still doesn't work (using Ctrl+H). I just can't figure it out!!
This pretty much explains it, doesn't it? If your editor can't find it, neither can Latex. This is not a latex problem, it is a file problem.

Find and download a hex editor (khexedit, hexeditor) and look at what you think \node0 is. I am sure there are some stray characters close.