Visit Jeremy's Blog.
 Home Forums HCL Reviews Tutorials Articles Register Search Today's Posts Mark Forums Read
 LinuxQuestions.org Latex Problem: Backslash Recognized as Two Backslashes "doesn't match its definition"
 User Name Remember Me? Password
 Linux - General This Linux forum is for general Linux questions and discussion. If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

05-09-2012, 12:12 PM   #1
rm_-rf_windows
Member

Registered: Jun 2007
Location: Europe
Distribution: Ubuntu
Posts: 209

Rep:
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

Last edited by rm_-rf_windows; 05-09-2012 at 12:13 PM.

 05-09-2012, 09:06 PM #2 amani Senior Member   Registered: Jul 2006 Location: Kolkata, India Distribution: 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware, Posts: 2,758 Rep: the config/session files may be corrupt. Change editor or delete files.
05-09-2012, 09:54 PM   #3
Senior Member

Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,366

Rep:
Quote:
 Originally Posted by rm_-rf_windows 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.

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.