Put a circle around elements in a matrix environment
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
So I'm trying to put circles around 6,8,10,18 in row 1-4 respectively, however this does give me an error warning saying "missing $ inserted"
documentclassarticle
usepackagemathtools
setlengthparindent0pt
usepackagetikz
begindocument
$
textM=beginpmatrix
4 & tikznode[draw,circle]6 & 4 & 5 \
3 & 8 & 1 & 6 \
2 & 9 & 2 & 10 \
1 & 2 & 3 & 18
endpmatrix
$
enddocument
How can I correct this error, because positioning various $ around the command hasn't helped so far.
tikz-pgf matrices nodes
add a comment |Â
up vote
2
down vote
favorite
So I'm trying to put circles around 6,8,10,18 in row 1-4 respectively, however this does give me an error warning saying "missing $ inserted"
documentclassarticle
usepackagemathtools
setlengthparindent0pt
usepackagetikz
begindocument
$
textM=beginpmatrix
4 & tikznode[draw,circle]6 & 4 & 5 \
3 & 8 & 1 & 6 \
2 & 9 & 2 & 10 \
1 & 2 & 3 & 18
endpmatrix
$
enddocument
How can I correct this error, because positioning various $ around the command hasn't helped so far.
tikz-pgf matrices nodes
This code is not compileable, you must give the entire code starting withdocumentclass
and ending withenddocument
which allows you to reproduce your error.
– AndréC
1 hour ago
it's a fragment of the code, it's embedded in a article environment
– Christian Singer
1 hour ago
The fragment should now be compileable
– Christian Singer
1 hour ago
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
So I'm trying to put circles around 6,8,10,18 in row 1-4 respectively, however this does give me an error warning saying "missing $ inserted"
documentclassarticle
usepackagemathtools
setlengthparindent0pt
usepackagetikz
begindocument
$
textM=beginpmatrix
4 & tikznode[draw,circle]6 & 4 & 5 \
3 & 8 & 1 & 6 \
2 & 9 & 2 & 10 \
1 & 2 & 3 & 18
endpmatrix
$
enddocument
How can I correct this error, because positioning various $ around the command hasn't helped so far.
tikz-pgf matrices nodes
So I'm trying to put circles around 6,8,10,18 in row 1-4 respectively, however this does give me an error warning saying "missing $ inserted"
documentclassarticle
usepackagemathtools
setlengthparindent0pt
usepackagetikz
begindocument
$
textM=beginpmatrix
4 & tikznode[draw,circle]6 & 4 & 5 \
3 & 8 & 1 & 6 \
2 & 9 & 2 & 10 \
1 & 2 & 3 & 18
endpmatrix
$
enddocument
How can I correct this error, because positioning various $ around the command hasn't helped so far.
tikz-pgf matrices nodes
tikz-pgf matrices nodes
edited 1 hour ago
asked 1 hour ago


Christian Singer
1156
1156
This code is not compileable, you must give the entire code starting withdocumentclass
and ending withenddocument
which allows you to reproduce your error.
– AndréC
1 hour ago
it's a fragment of the code, it's embedded in a article environment
– Christian Singer
1 hour ago
The fragment should now be compileable
– Christian Singer
1 hour ago
add a comment |Â
This code is not compileable, you must give the entire code starting withdocumentclass
and ending withenddocument
which allows you to reproduce your error.
– AndréC
1 hour ago
it's a fragment of the code, it's embedded in a article environment
– Christian Singer
1 hour ago
The fragment should now be compileable
– Christian Singer
1 hour ago
This code is not compileable, you must give the entire code starting with
documentclass
and ending with enddocument
which allows you to reproduce your error.– AndréC
1 hour ago
This code is not compileable, you must give the entire code starting with
documentclass
and ending with enddocument
which allows you to reproduce your error.– AndréC
1 hour ago
it's a fragment of the code, it's embedded in a article environment
– Christian Singer
1 hour ago
it's a fragment of the code, it's embedded in a article environment
– Christian Singer
1 hour ago
The fragment should now be compileable
– Christian Singer
1 hour ago
The fragment should now be compileable
– Christian Singer
1 hour ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
The tikz code must always be ended with a semicolon.
4 & tikznode[draw,circle]6; & 4 & 5 \
documentclassarticle
usepackagemathtools
setlengthparindent0pt
usepackagetikz
begindocument
$
textM=
beginpmatrix
4 & tikznode[draw,circle]6; & 4 & 5 \
3 & 8 & 1 & 6 \
2 & 9 & 2 & 10 \
1 & 2 & 3 & 18
endpmatrix
$
enddocument
Well that's straight forward! Thanks!
– Christian Singer
1 hour ago
@ChristianSinger It is not necessary to usemathtools
,tikz
has a native matrix management that simplifies syntax.
– AndréC
59 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
The tikz code must always be ended with a semicolon.
4 & tikznode[draw,circle]6; & 4 & 5 \
documentclassarticle
usepackagemathtools
setlengthparindent0pt
usepackagetikz
begindocument
$
textM=
beginpmatrix
4 & tikznode[draw,circle]6; & 4 & 5 \
3 & 8 & 1 & 6 \
2 & 9 & 2 & 10 \
1 & 2 & 3 & 18
endpmatrix
$
enddocument
Well that's straight forward! Thanks!
– Christian Singer
1 hour ago
@ChristianSinger It is not necessary to usemathtools
,tikz
has a native matrix management that simplifies syntax.
– AndréC
59 mins ago
add a comment |Â
up vote
3
down vote
accepted
The tikz code must always be ended with a semicolon.
4 & tikznode[draw,circle]6; & 4 & 5 \
documentclassarticle
usepackagemathtools
setlengthparindent0pt
usepackagetikz
begindocument
$
textM=
beginpmatrix
4 & tikznode[draw,circle]6; & 4 & 5 \
3 & 8 & 1 & 6 \
2 & 9 & 2 & 10 \
1 & 2 & 3 & 18
endpmatrix
$
enddocument
Well that's straight forward! Thanks!
– Christian Singer
1 hour ago
@ChristianSinger It is not necessary to usemathtools
,tikz
has a native matrix management that simplifies syntax.
– AndréC
59 mins ago
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
The tikz code must always be ended with a semicolon.
4 & tikznode[draw,circle]6; & 4 & 5 \
documentclassarticle
usepackagemathtools
setlengthparindent0pt
usepackagetikz
begindocument
$
textM=
beginpmatrix
4 & tikznode[draw,circle]6; & 4 & 5 \
3 & 8 & 1 & 6 \
2 & 9 & 2 & 10 \
1 & 2 & 3 & 18
endpmatrix
$
enddocument
The tikz code must always be ended with a semicolon.
4 & tikznode[draw,circle]6; & 4 & 5 \
documentclassarticle
usepackagemathtools
setlengthparindent0pt
usepackagetikz
begindocument
$
textM=
beginpmatrix
4 & tikznode[draw,circle]6; & 4 & 5 \
3 & 8 & 1 & 6 \
2 & 9 & 2 & 10 \
1 & 2 & 3 & 18
endpmatrix
$
enddocument
answered 1 hour ago
AndréC
4,5071834
4,5071834
Well that's straight forward! Thanks!
– Christian Singer
1 hour ago
@ChristianSinger It is not necessary to usemathtools
,tikz
has a native matrix management that simplifies syntax.
– AndréC
59 mins ago
add a comment |Â
Well that's straight forward! Thanks!
– Christian Singer
1 hour ago
@ChristianSinger It is not necessary to usemathtools
,tikz
has a native matrix management that simplifies syntax.
– AndréC
59 mins ago
Well that's straight forward! Thanks!
– Christian Singer
1 hour ago
Well that's straight forward! Thanks!
– Christian Singer
1 hour ago
@ChristianSinger It is not necessary to use
mathtools
, tikz
has a native matrix management that simplifies syntax.– AndréC
59 mins ago
@ChristianSinger It is not necessary to use
mathtools
, tikz
has a native matrix management that simplifies syntax.– AndréC
59 mins ago
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f457209%2fput-a-circle-around-elements-in-a-matrix-environment%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
This code is not compileable, you must give the entire code starting with
documentclass
and ending withenddocument
which allows you to reproduce your error.– AndréC
1 hour ago
it's a fragment of the code, it's embedded in a article environment
– Christian Singer
1 hour ago
The fragment should now be compileable
– Christian Singer
1 hour ago