Put a circle around elements in a matrix environment

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











up vote
2
down vote

favorite
1












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.










share|improve this question























  • 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










  • The fragment should now be compileable
    – Christian Singer
    1 hour ago














up vote
2
down vote

favorite
1












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.










share|improve this question























  • 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










  • The fragment should now be compileable
    – Christian Singer
    1 hour ago












up vote
2
down vote

favorite
1









up vote
2
down vote

favorite
1






1





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.










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 1 hour ago

























asked 1 hour ago









Christian Singer

1156




1156











  • 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










  • 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










  • 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










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 \ 


matrice



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





share|improve this answer




















  • 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










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%2f457209%2fput-a-circle-around-elements-in-a-matrix-environment%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
3
down vote



accepted










The tikz code must always be ended with a semicolon.



4 & tikznode[draw,circle]6; & 4 & 5 \ 


matrice



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





share|improve this answer




















  • 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














up vote
3
down vote



accepted










The tikz code must always be ended with a semicolon.



4 & tikznode[draw,circle]6; & 4 & 5 \ 


matrice



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





share|improve this answer




















  • 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












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 \ 


matrice



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





share|improve this answer












The tikz code must always be ended with a semicolon.



4 & tikznode[draw,circle]6; & 4 & 5 \ 


matrice



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






share|improve this answer












share|improve this answer



share|improve this answer










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 use mathtools, 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










  • @ChristianSinger It is not necessary to use mathtools, 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

















 

draft saved


draft discarded















































 


draft saved


draft discarded














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













































































Comments

Popular posts from this blog

What does second last employer means? [closed]

List of Gilmore Girls characters

Confectionery