You can't use `the character 0' after the

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












I tried to draw the following picture usin Tikz, but got the error message in the title of this issue.



enter image description here



This is the code I am using. Observe that the error message comes when I try to insert the node $v_0$. Can anyone tell me whats going wrong here?



begintikzpicture
deffin3 %... end of the slope
defbot-2 %... height of the slope
defmp2 %... x-coordinate of final moto's position
%... environment
draw[gray!50,fill=gray!50,very thick]
(-2,0)--
(0,0)--
(fin,bot)--
(fin+1,bot)--
(fin+1,bot-0.2)--
(-2,bot-0.2)--cycle
;

%-> DEFINE THE MOTO PICTURE (#1=size, #2=location, #3=rotation)
defmoto#1#2#3
defwd#1 %... wheel axis distance and moto height
defwr#1/4 %... wheel radius
defpos#2++(0,wr) %... position of the very bottom point of the wheel

%... wheels
draw[gray!50,very thick]
pos circle(wr)
pos+(#3:wd) circle(wr)
;
%... chassis
draw[gray!50,fill=gray!50]
pos+(#3+120:6*wr/5) arc(120+#3:#3:6*wr/5)--++
(#3:wd-12*wr/5) arc(#3+180:#3+60:6*wr/5)--++
(#3+90:wr/5) arc(#3+60:#3+90:9*wr/5)--++
(#3+120:wr)--++
(#3+210:2*wr)--++
(#3+180:3*wr)
;
%... motorcyclist
draw[gray!50,line width=4*wd]
pos+(#3+60:6*wr/5)--++
(#3+60:3*wr)
pos++(#3+60:4*wr) circle(2*wr/3)
pos++(#3+60:3*wr)--++
(#3-10:2*wr)
;
%... velocity vector
%draw[->,gray!50,very thick]
% pos++(#3:wd)++(#3+90:wr)--++
% (#3:wd)% node[above]$v_0$
% ;

%... the sizes
draw[<->,thick,white]
(0,0)--
(0,mp*bot/fin) node[midway,fill=gray!50]$h$
;
draw[<->,thick,white]
(0,mp*bot/fin-0.1)--
(mp,mp*bot/fin-0.1) node[midway,fill=gray!50]$x$
;
draw[gray!50,dashed,thick]
(-0.5,0.25)--
(0,0.25) to[out=0,in=100]
(mp+0.25,(mp+0.25)*bot/fin)
;

moto0.5(-1.5,0)0
draw[->,gray!50,very thick]
(-1,0.3)--
(-0.5,0.3)% node[above]$v_0$
;
draw[gray!50]
(-0.5,0.3) node[above]$v_0$
;
moto0.5(mp,mp*bot/fin)atan(bot/fin)
endtikzpicture









share|improve this question

















  • 3




    Don't redefine wd. wd is a TeX (very used) primitive. Call it wad or some other name.
    – Phelype Oleinik
    2 hours ago











  • Thank you very much, @PhelypeOleinik! Can you please post as an aswer so I can mark it?
    – Brasil
    2 hours ago














up vote
3
down vote

favorite












I tried to draw the following picture usin Tikz, but got the error message in the title of this issue.



enter image description here



This is the code I am using. Observe that the error message comes when I try to insert the node $v_0$. Can anyone tell me whats going wrong here?



begintikzpicture
deffin3 %... end of the slope
defbot-2 %... height of the slope
defmp2 %... x-coordinate of final moto's position
%... environment
draw[gray!50,fill=gray!50,very thick]
(-2,0)--
(0,0)--
(fin,bot)--
(fin+1,bot)--
(fin+1,bot-0.2)--
(-2,bot-0.2)--cycle
;

%-> DEFINE THE MOTO PICTURE (#1=size, #2=location, #3=rotation)
defmoto#1#2#3
defwd#1 %... wheel axis distance and moto height
defwr#1/4 %... wheel radius
defpos#2++(0,wr) %... position of the very bottom point of the wheel

%... wheels
draw[gray!50,very thick]
pos circle(wr)
pos+(#3:wd) circle(wr)
;
%... chassis
draw[gray!50,fill=gray!50]
pos+(#3+120:6*wr/5) arc(120+#3:#3:6*wr/5)--++
(#3:wd-12*wr/5) arc(#3+180:#3+60:6*wr/5)--++
(#3+90:wr/5) arc(#3+60:#3+90:9*wr/5)--++
(#3+120:wr)--++
(#3+210:2*wr)--++
(#3+180:3*wr)
;
%... motorcyclist
draw[gray!50,line width=4*wd]
pos+(#3+60:6*wr/5)--++
(#3+60:3*wr)
pos++(#3+60:4*wr) circle(2*wr/3)
pos++(#3+60:3*wr)--++
(#3-10:2*wr)
;
%... velocity vector
%draw[->,gray!50,very thick]
% pos++(#3:wd)++(#3+90:wr)--++
% (#3:wd)% node[above]$v_0$
% ;

%... the sizes
draw[<->,thick,white]
(0,0)--
(0,mp*bot/fin) node[midway,fill=gray!50]$h$
;
draw[<->,thick,white]
(0,mp*bot/fin-0.1)--
(mp,mp*bot/fin-0.1) node[midway,fill=gray!50]$x$
;
draw[gray!50,dashed,thick]
(-0.5,0.25)--
(0,0.25) to[out=0,in=100]
(mp+0.25,(mp+0.25)*bot/fin)
;

moto0.5(-1.5,0)0
draw[->,gray!50,very thick]
(-1,0.3)--
(-0.5,0.3)% node[above]$v_0$
;
draw[gray!50]
(-0.5,0.3) node[above]$v_0$
;
moto0.5(mp,mp*bot/fin)atan(bot/fin)
endtikzpicture









share|improve this question

















  • 3




    Don't redefine wd. wd is a TeX (very used) primitive. Call it wad or some other name.
    – Phelype Oleinik
    2 hours ago











  • Thank you very much, @PhelypeOleinik! Can you please post as an aswer so I can mark it?
    – Brasil
    2 hours ago












up vote
3
down vote

favorite









up vote
3
down vote

favorite











I tried to draw the following picture usin Tikz, but got the error message in the title of this issue.



enter image description here



This is the code I am using. Observe that the error message comes when I try to insert the node $v_0$. Can anyone tell me whats going wrong here?



begintikzpicture
deffin3 %... end of the slope
defbot-2 %... height of the slope
defmp2 %... x-coordinate of final moto's position
%... environment
draw[gray!50,fill=gray!50,very thick]
(-2,0)--
(0,0)--
(fin,bot)--
(fin+1,bot)--
(fin+1,bot-0.2)--
(-2,bot-0.2)--cycle
;

%-> DEFINE THE MOTO PICTURE (#1=size, #2=location, #3=rotation)
defmoto#1#2#3
defwd#1 %... wheel axis distance and moto height
defwr#1/4 %... wheel radius
defpos#2++(0,wr) %... position of the very bottom point of the wheel

%... wheels
draw[gray!50,very thick]
pos circle(wr)
pos+(#3:wd) circle(wr)
;
%... chassis
draw[gray!50,fill=gray!50]
pos+(#3+120:6*wr/5) arc(120+#3:#3:6*wr/5)--++
(#3:wd-12*wr/5) arc(#3+180:#3+60:6*wr/5)--++
(#3+90:wr/5) arc(#3+60:#3+90:9*wr/5)--++
(#3+120:wr)--++
(#3+210:2*wr)--++
(#3+180:3*wr)
;
%... motorcyclist
draw[gray!50,line width=4*wd]
pos+(#3+60:6*wr/5)--++
(#3+60:3*wr)
pos++(#3+60:4*wr) circle(2*wr/3)
pos++(#3+60:3*wr)--++
(#3-10:2*wr)
;
%... velocity vector
%draw[->,gray!50,very thick]
% pos++(#3:wd)++(#3+90:wr)--++
% (#3:wd)% node[above]$v_0$
% ;

%... the sizes
draw[<->,thick,white]
(0,0)--
(0,mp*bot/fin) node[midway,fill=gray!50]$h$
;
draw[<->,thick,white]
(0,mp*bot/fin-0.1)--
(mp,mp*bot/fin-0.1) node[midway,fill=gray!50]$x$
;
draw[gray!50,dashed,thick]
(-0.5,0.25)--
(0,0.25) to[out=0,in=100]
(mp+0.25,(mp+0.25)*bot/fin)
;

moto0.5(-1.5,0)0
draw[->,gray!50,very thick]
(-1,0.3)--
(-0.5,0.3)% node[above]$v_0$
;
draw[gray!50]
(-0.5,0.3) node[above]$v_0$
;
moto0.5(mp,mp*bot/fin)atan(bot/fin)
endtikzpicture









share|improve this question













I tried to draw the following picture usin Tikz, but got the error message in the title of this issue.



enter image description here



This is the code I am using. Observe that the error message comes when I try to insert the node $v_0$. Can anyone tell me whats going wrong here?



begintikzpicture
deffin3 %... end of the slope
defbot-2 %... height of the slope
defmp2 %... x-coordinate of final moto's position
%... environment
draw[gray!50,fill=gray!50,very thick]
(-2,0)--
(0,0)--
(fin,bot)--
(fin+1,bot)--
(fin+1,bot-0.2)--
(-2,bot-0.2)--cycle
;

%-> DEFINE THE MOTO PICTURE (#1=size, #2=location, #3=rotation)
defmoto#1#2#3
defwd#1 %... wheel axis distance and moto height
defwr#1/4 %... wheel radius
defpos#2++(0,wr) %... position of the very bottom point of the wheel

%... wheels
draw[gray!50,very thick]
pos circle(wr)
pos+(#3:wd) circle(wr)
;
%... chassis
draw[gray!50,fill=gray!50]
pos+(#3+120:6*wr/5) arc(120+#3:#3:6*wr/5)--++
(#3:wd-12*wr/5) arc(#3+180:#3+60:6*wr/5)--++
(#3+90:wr/5) arc(#3+60:#3+90:9*wr/5)--++
(#3+120:wr)--++
(#3+210:2*wr)--++
(#3+180:3*wr)
;
%... motorcyclist
draw[gray!50,line width=4*wd]
pos+(#3+60:6*wr/5)--++
(#3+60:3*wr)
pos++(#3+60:4*wr) circle(2*wr/3)
pos++(#3+60:3*wr)--++
(#3-10:2*wr)
;
%... velocity vector
%draw[->,gray!50,very thick]
% pos++(#3:wd)++(#3+90:wr)--++
% (#3:wd)% node[above]$v_0$
% ;

%... the sizes
draw[<->,thick,white]
(0,0)--
(0,mp*bot/fin) node[midway,fill=gray!50]$h$
;
draw[<->,thick,white]
(0,mp*bot/fin-0.1)--
(mp,mp*bot/fin-0.1) node[midway,fill=gray!50]$x$
;
draw[gray!50,dashed,thick]
(-0.5,0.25)--
(0,0.25) to[out=0,in=100]
(mp+0.25,(mp+0.25)*bot/fin)
;

moto0.5(-1.5,0)0
draw[->,gray!50,very thick]
(-1,0.3)--
(-0.5,0.3)% node[above]$v_0$
;
draw[gray!50]
(-0.5,0.3) node[above]$v_0$
;
moto0.5(mp,mp*bot/fin)atan(bot/fin)
endtikzpicture






tikz-pgf






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 hours ago









Brasil

849




849







  • 3




    Don't redefine wd. wd is a TeX (very used) primitive. Call it wad or some other name.
    – Phelype Oleinik
    2 hours ago











  • Thank you very much, @PhelypeOleinik! Can you please post as an aswer so I can mark it?
    – Brasil
    2 hours ago












  • 3




    Don't redefine wd. wd is a TeX (very used) primitive. Call it wad or some other name.
    – Phelype Oleinik
    2 hours ago











  • Thank you very much, @PhelypeOleinik! Can you please post as an aswer so I can mark it?
    – Brasil
    2 hours ago







3




3




Don't redefine wd. wd is a TeX (very used) primitive. Call it wad or some other name.
– Phelype Oleinik
2 hours ago





Don't redefine wd. wd is a TeX (very used) primitive. Call it wad or some other name.
– Phelype Oleinik
2 hours ago













Thank you very much, @PhelypeOleinik! Can you please post as an aswer so I can mark it?
– Brasil
2 hours ago




Thank you very much, @PhelypeOleinik! Can you please post as an aswer so I can mark it?
– Brasil
2 hours ago










1 Answer
1






active

oldest

votes

















up vote
6
down vote



accepted










The problem is that you redefined TeX's wd primitive, which gets the width of a box. Try the example below with the defwd0.5 (which is what your code does when you call moto0.5) uncommented:



documentclassarticle

begindocument

newboxtempbox
setboxtempboxhboxDon't emphever redefine TeX's internals.

% defwd0.5
The width of the following warning is: thewdtempbox

boxtempbox

enddocument


Once you change wd by something that is not used by TeX then it will work.



This is one of the main reasons that LaTeX's newcommand and its successors are recommended for end users and raise an error if a command is already defined: error messages get a whole lot more interesting if you redefine something you shouldn't.






share|improve this answer
















  • 2




    A long term target for LaTeX3 is to express all internal functions in terms of aliases of the primitives, so redefining a primitive will not be a problem. Of course, all packages should follow suit, which is the big issue.
    – egreg
    2 hours ago










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f455547%2fyou-cant-use-the-character-0-after-the%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
6
down vote



accepted










The problem is that you redefined TeX's wd primitive, which gets the width of a box. Try the example below with the defwd0.5 (which is what your code does when you call moto0.5) uncommented:



documentclassarticle

begindocument

newboxtempbox
setboxtempboxhboxDon't emphever redefine TeX's internals.

% defwd0.5
The width of the following warning is: thewdtempbox

boxtempbox

enddocument


Once you change wd by something that is not used by TeX then it will work.



This is one of the main reasons that LaTeX's newcommand and its successors are recommended for end users and raise an error if a command is already defined: error messages get a whole lot more interesting if you redefine something you shouldn't.






share|improve this answer
















  • 2




    A long term target for LaTeX3 is to express all internal functions in terms of aliases of the primitives, so redefining a primitive will not be a problem. Of course, all packages should follow suit, which is the big issue.
    – egreg
    2 hours ago














up vote
6
down vote



accepted










The problem is that you redefined TeX's wd primitive, which gets the width of a box. Try the example below with the defwd0.5 (which is what your code does when you call moto0.5) uncommented:



documentclassarticle

begindocument

newboxtempbox
setboxtempboxhboxDon't emphever redefine TeX's internals.

% defwd0.5
The width of the following warning is: thewdtempbox

boxtempbox

enddocument


Once you change wd by something that is not used by TeX then it will work.



This is one of the main reasons that LaTeX's newcommand and its successors are recommended for end users and raise an error if a command is already defined: error messages get a whole lot more interesting if you redefine something you shouldn't.






share|improve this answer
















  • 2




    A long term target for LaTeX3 is to express all internal functions in terms of aliases of the primitives, so redefining a primitive will not be a problem. Of course, all packages should follow suit, which is the big issue.
    – egreg
    2 hours ago












up vote
6
down vote



accepted







up vote
6
down vote



accepted






The problem is that you redefined TeX's wd primitive, which gets the width of a box. Try the example below with the defwd0.5 (which is what your code does when you call moto0.5) uncommented:



documentclassarticle

begindocument

newboxtempbox
setboxtempboxhboxDon't emphever redefine TeX's internals.

% defwd0.5
The width of the following warning is: thewdtempbox

boxtempbox

enddocument


Once you change wd by something that is not used by TeX then it will work.



This is one of the main reasons that LaTeX's newcommand and its successors are recommended for end users and raise an error if a command is already defined: error messages get a whole lot more interesting if you redefine something you shouldn't.






share|improve this answer












The problem is that you redefined TeX's wd primitive, which gets the width of a box. Try the example below with the defwd0.5 (which is what your code does when you call moto0.5) uncommented:



documentclassarticle

begindocument

newboxtempbox
setboxtempboxhboxDon't emphever redefine TeX's internals.

% defwd0.5
The width of the following warning is: thewdtempbox

boxtempbox

enddocument


Once you change wd by something that is not used by TeX then it will work.



This is one of the main reasons that LaTeX's newcommand and its successors are recommended for end users and raise an error if a command is already defined: error messages get a whole lot more interesting if you redefine something you shouldn't.







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 hours ago









Phelype Oleinik

18.7k54173




18.7k54173







  • 2




    A long term target for LaTeX3 is to express all internal functions in terms of aliases of the primitives, so redefining a primitive will not be a problem. Of course, all packages should follow suit, which is the big issue.
    – egreg
    2 hours ago












  • 2




    A long term target for LaTeX3 is to express all internal functions in terms of aliases of the primitives, so redefining a primitive will not be a problem. Of course, all packages should follow suit, which is the big issue.
    – egreg
    2 hours ago







2




2




A long term target for LaTeX3 is to express all internal functions in terms of aliases of the primitives, so redefining a primitive will not be a problem. Of course, all packages should follow suit, which is the big issue.
– egreg
2 hours ago




A long term target for LaTeX3 is to express all internal functions in terms of aliases of the primitives, so redefining a primitive will not be a problem. Of course, all packages should follow suit, which is the big issue.
– egreg
2 hours ago

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f455547%2fyou-cant-use-the-character-0-after-the%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

Long meetings (6-7 hours a day): Being “babysat” by supervisor

Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

Confectionery