LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Latex Problem: Backslash Recognized as Two Backslashes "doesn't match its definition" (https://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 12: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!

Please help!

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!!

Thanks in advance,

rm

amani 05-09-2012 09:06 PM

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

jlinkels 05-09-2012 09:54 PM

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.

jlinkels

PS Not that I understand everything. You retype \node0. Didn't work. You replaced with caca1. Worked. Editors don't see no difference in retyping \node0 or retyping caca1.

jlinkels


All times are GMT -5. The time now is 08:09 PM.