How to create two box side by side in latex without using tikzlibrary
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
I want to write down this code in latex. I write down a code for this but it not properly displayed as per the picture.
My code
indentfbox$Sigma=Omega^-1$ \ $mu=Omega^-1xi$
What should be the proper code? I don't have usetikzlibrarypositioning library in Texstudio. Without using it can I create it?
amsmath text documentation fbox
New contributor
add a comment |Â
up vote
4
down vote
favorite
I want to write down this code in latex. I write down a code for this but it not properly displayed as per the picture.
My code
indentfbox$Sigma=Omega^-1$ \ $mu=Omega^-1xi$
What should be the proper code? I don't have usetikzlibrarypositioning library in Texstudio. Without using it can I create it?
amsmath text documentation fbox
New contributor
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I want to write down this code in latex. I write down a code for this but it not properly displayed as per the picture.
My code
indentfbox$Sigma=Omega^-1$ \ $mu=Omega^-1xi$
What should be the proper code? I don't have usetikzlibrarypositioning library in Texstudio. Without using it can I create it?
amsmath text documentation fbox
New contributor
I want to write down this code in latex. I write down a code for this but it not properly displayed as per the picture.
My code
indentfbox$Sigma=Omega^-1$ \ $mu=Omega^-1xi$
What should be the proper code? I don't have usetikzlibrarypositioning library in Texstudio. Without using it can I create it?
amsmath text documentation fbox
amsmath text documentation fbox
New contributor
New contributor
New contributor
asked 47 mins ago
Ellena Mori
453
453
New contributor
New contributor
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
5
down vote
accepted
You can use fcolorbox
from the xcolor
package and a tabular
to align them side by side.
documentclassarticle
usepackageamsmath
usepackagexcolor
begindocument
setlengthfboxrule1pt
begintabularcc
moments & canonical \
fcolorboxred!50!blackwhite$
beginaligned
Sigma &= Omega^-1 \
mu &= Omega^-1 xi
endaligned
$ &
fcolorboxred!50!blackwhite$
beginaligned
Omega &= Sigma^-1 \
xi &= Sigma^-1 mu
endaligned
$ \
endtabular
enddocument
Another alternative is to use MetaPost with LuaTeX.
documentclassarticle
usepackageamsmath
usepackageluamplib
mplibtextextlabelenable
everymplib
input rboxes;
beginfig(0);
everyendmplibendfig;
begindocument
beginmplibcode
boxit.moments(btex
$
beginaligned
Sigma &= Omega^-1 \
mu &= Omega^-1 xi
endaligned
$
etex);
moments.c = (-1cm,0);
boxit.canonical(btex
$
beginaligned
Omega &= Sigma^-1 \
xi &= Sigma^-1 mu
endaligned
$
etex);
canonical.c = (1cm,0);
draw bpath moments withpen pencircle scaled 1pt withcolor .5[red,black];
draw bpath canonical withpen pencircle scaled 1pt withcolor .5[red,black];
drawunboxed(moments, canonical);
label.top("moments", moments.n);
label.top("canonical", canonical.n);
endmplibcode
enddocument
add a comment |Â
up vote
2
down vote
You can use a tabular
, with a little help from hhline
:
documentclassarticle
usepackagehhline
usepackage[table]xcolor
begindocument
begincenter % or [
arrayrulecolorred!50!black
setlengtharrayrulewidth1pt
renewcommandarraystretch1.2
begintabularc
multicolumn1cmoments &
multicolumn1cqquad &
multicolumn1ccanonical \
hhline-
$Sigma=Omega^-1$ && $Omega=Sigma^-1$ \
$mu=Omega^-1xi$ && $xi=Sigma^-1mu$ \
hhline-
endtabular
arrayrulecolorblack % because `arrayrulecolor` is global
endcenter % or ]
enddocument
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
You can use fcolorbox
from the xcolor
package and a tabular
to align them side by side.
documentclassarticle
usepackageamsmath
usepackagexcolor
begindocument
setlengthfboxrule1pt
begintabularcc
moments & canonical \
fcolorboxred!50!blackwhite$
beginaligned
Sigma &= Omega^-1 \
mu &= Omega^-1 xi
endaligned
$ &
fcolorboxred!50!blackwhite$
beginaligned
Omega &= Sigma^-1 \
xi &= Sigma^-1 mu
endaligned
$ \
endtabular
enddocument
Another alternative is to use MetaPost with LuaTeX.
documentclassarticle
usepackageamsmath
usepackageluamplib
mplibtextextlabelenable
everymplib
input rboxes;
beginfig(0);
everyendmplibendfig;
begindocument
beginmplibcode
boxit.moments(btex
$
beginaligned
Sigma &= Omega^-1 \
mu &= Omega^-1 xi
endaligned
$
etex);
moments.c = (-1cm,0);
boxit.canonical(btex
$
beginaligned
Omega &= Sigma^-1 \
xi &= Sigma^-1 mu
endaligned
$
etex);
canonical.c = (1cm,0);
draw bpath moments withpen pencircle scaled 1pt withcolor .5[red,black];
draw bpath canonical withpen pencircle scaled 1pt withcolor .5[red,black];
drawunboxed(moments, canonical);
label.top("moments", moments.n);
label.top("canonical", canonical.n);
endmplibcode
enddocument
add a comment |Â
up vote
5
down vote
accepted
You can use fcolorbox
from the xcolor
package and a tabular
to align them side by side.
documentclassarticle
usepackageamsmath
usepackagexcolor
begindocument
setlengthfboxrule1pt
begintabularcc
moments & canonical \
fcolorboxred!50!blackwhite$
beginaligned
Sigma &= Omega^-1 \
mu &= Omega^-1 xi
endaligned
$ &
fcolorboxred!50!blackwhite$
beginaligned
Omega &= Sigma^-1 \
xi &= Sigma^-1 mu
endaligned
$ \
endtabular
enddocument
Another alternative is to use MetaPost with LuaTeX.
documentclassarticle
usepackageamsmath
usepackageluamplib
mplibtextextlabelenable
everymplib
input rboxes;
beginfig(0);
everyendmplibendfig;
begindocument
beginmplibcode
boxit.moments(btex
$
beginaligned
Sigma &= Omega^-1 \
mu &= Omega^-1 xi
endaligned
$
etex);
moments.c = (-1cm,0);
boxit.canonical(btex
$
beginaligned
Omega &= Sigma^-1 \
xi &= Sigma^-1 mu
endaligned
$
etex);
canonical.c = (1cm,0);
draw bpath moments withpen pencircle scaled 1pt withcolor .5[red,black];
draw bpath canonical withpen pencircle scaled 1pt withcolor .5[red,black];
drawunboxed(moments, canonical);
label.top("moments", moments.n);
label.top("canonical", canonical.n);
endmplibcode
enddocument
add a comment |Â
up vote
5
down vote
accepted
up vote
5
down vote
accepted
You can use fcolorbox
from the xcolor
package and a tabular
to align them side by side.
documentclassarticle
usepackageamsmath
usepackagexcolor
begindocument
setlengthfboxrule1pt
begintabularcc
moments & canonical \
fcolorboxred!50!blackwhite$
beginaligned
Sigma &= Omega^-1 \
mu &= Omega^-1 xi
endaligned
$ &
fcolorboxred!50!blackwhite$
beginaligned
Omega &= Sigma^-1 \
xi &= Sigma^-1 mu
endaligned
$ \
endtabular
enddocument
Another alternative is to use MetaPost with LuaTeX.
documentclassarticle
usepackageamsmath
usepackageluamplib
mplibtextextlabelenable
everymplib
input rboxes;
beginfig(0);
everyendmplibendfig;
begindocument
beginmplibcode
boxit.moments(btex
$
beginaligned
Sigma &= Omega^-1 \
mu &= Omega^-1 xi
endaligned
$
etex);
moments.c = (-1cm,0);
boxit.canonical(btex
$
beginaligned
Omega &= Sigma^-1 \
xi &= Sigma^-1 mu
endaligned
$
etex);
canonical.c = (1cm,0);
draw bpath moments withpen pencircle scaled 1pt withcolor .5[red,black];
draw bpath canonical withpen pencircle scaled 1pt withcolor .5[red,black];
drawunboxed(moments, canonical);
label.top("moments", moments.n);
label.top("canonical", canonical.n);
endmplibcode
enddocument
You can use fcolorbox
from the xcolor
package and a tabular
to align them side by side.
documentclassarticle
usepackageamsmath
usepackagexcolor
begindocument
setlengthfboxrule1pt
begintabularcc
moments & canonical \
fcolorboxred!50!blackwhite$
beginaligned
Sigma &= Omega^-1 \
mu &= Omega^-1 xi
endaligned
$ &
fcolorboxred!50!blackwhite$
beginaligned
Omega &= Sigma^-1 \
xi &= Sigma^-1 mu
endaligned
$ \
endtabular
enddocument
Another alternative is to use MetaPost with LuaTeX.
documentclassarticle
usepackageamsmath
usepackageluamplib
mplibtextextlabelenable
everymplib
input rboxes;
beginfig(0);
everyendmplibendfig;
begindocument
beginmplibcode
boxit.moments(btex
$
beginaligned
Sigma &= Omega^-1 \
mu &= Omega^-1 xi
endaligned
$
etex);
moments.c = (-1cm,0);
boxit.canonical(btex
$
beginaligned
Omega &= Sigma^-1 \
xi &= Sigma^-1 mu
endaligned
$
etex);
canonical.c = (1cm,0);
draw bpath moments withpen pencircle scaled 1pt withcolor .5[red,black];
draw bpath canonical withpen pencircle scaled 1pt withcolor .5[red,black];
drawunboxed(moments, canonical);
label.top("moments", moments.n);
label.top("canonical", canonical.n);
endmplibcode
enddocument
edited 10 mins ago
answered 35 mins ago
Henri Menke
64.8k7144253
64.8k7144253
add a comment |Â
add a comment |Â
up vote
2
down vote
You can use a tabular
, with a little help from hhline
:
documentclassarticle
usepackagehhline
usepackage[table]xcolor
begindocument
begincenter % or [
arrayrulecolorred!50!black
setlengtharrayrulewidth1pt
renewcommandarraystretch1.2
begintabularc
multicolumn1cmoments &
multicolumn1cqquad &
multicolumn1ccanonical \
hhline-
$Sigma=Omega^-1$ && $Omega=Sigma^-1$ \
$mu=Omega^-1xi$ && $xi=Sigma^-1mu$ \
hhline-
endtabular
arrayrulecolorblack % because `arrayrulecolor` is global
endcenter % or ]
enddocument
add a comment |Â
up vote
2
down vote
You can use a tabular
, with a little help from hhline
:
documentclassarticle
usepackagehhline
usepackage[table]xcolor
begindocument
begincenter % or [
arrayrulecolorred!50!black
setlengtharrayrulewidth1pt
renewcommandarraystretch1.2
begintabularc
multicolumn1cmoments &
multicolumn1cqquad &
multicolumn1ccanonical \
hhline-
$Sigma=Omega^-1$ && $Omega=Sigma^-1$ \
$mu=Omega^-1xi$ && $xi=Sigma^-1mu$ \
hhline-
endtabular
arrayrulecolorblack % because `arrayrulecolor` is global
endcenter % or ]
enddocument
add a comment |Â
up vote
2
down vote
up vote
2
down vote
You can use a tabular
, with a little help from hhline
:
documentclassarticle
usepackagehhline
usepackage[table]xcolor
begindocument
begincenter % or [
arrayrulecolorred!50!black
setlengtharrayrulewidth1pt
renewcommandarraystretch1.2
begintabularc
multicolumn1cmoments &
multicolumn1cqquad &
multicolumn1ccanonical \
hhline-
$Sigma=Omega^-1$ && $Omega=Sigma^-1$ \
$mu=Omega^-1xi$ && $xi=Sigma^-1mu$ \
hhline-
endtabular
arrayrulecolorblack % because `arrayrulecolor` is global
endcenter % or ]
enddocument
You can use a tabular
, with a little help from hhline
:
documentclassarticle
usepackagehhline
usepackage[table]xcolor
begindocument
begincenter % or [
arrayrulecolorred!50!black
setlengtharrayrulewidth1pt
renewcommandarraystretch1.2
begintabularc
multicolumn1cmoments &
multicolumn1cqquad &
multicolumn1ccanonical \
hhline-
$Sigma=Omega^-1$ && $Omega=Sigma^-1$ \
$mu=Omega^-1xi$ && $xi=Sigma^-1mu$ \
hhline-
endtabular
arrayrulecolorblack % because `arrayrulecolor` is global
endcenter % or ]
enddocument
answered 17 mins ago
egreg
685k8418263071
685k8418263071
add a comment |Â
add a comment |Â
Ellena Mori is a new contributor. Be nice, and check out our Code of Conduct.
Ellena Mori is a new contributor. Be nice, and check out our Code of Conduct.
Ellena Mori is a new contributor. Be nice, and check out our Code of Conduct.
Ellena Mori is a new contributor. Be nice, and check out our Code of Conduct.
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%2f452668%2fhow-to-create-two-box-side-by-side-in-latex-without-using-tikzlibrary%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