multiline equation inside a matrix that is a part of multiline equationMultiline equation and textMultiline equation with LHS alone on first line?Multiline equation without numbermultiline equation inside newglossaryentryAligning equation including multiline expressionsAligning Multiline Matrix EquationsMultiline equation inside a split environmentWriting matrix inside an equationSplitting a long text in an equationProblem splitting/fitting equation
How can I prevent interns from being expendable?
Asking bank to reduce APR instead of increasing credit limit
Possible nonclassical ion from a bicyclic system
How to detach yourself from a character you're going to kill?
If Sweden was to magically float away, at what altitude would it be visible from the southern hemisphere?
How should I push back against my job assigning "homework"?
Is it possible to kill all life on Earth?
Creating Fictional Slavic Place Names
Why would Lupin kill Pettigrew?
Modern approach to radio buttons
Points within polygons in different projections
What is the difference between nullifying your vote and not going to vote at all?
What was this black-and-white film set in the Arctic or Antarctic where the monster/alien gets fried in the end?
Term for checking piece whose opponent daren't capture it
find the Integer value after a string from a file
What is/are this/these giant NASA box(es)?
Can a non-EU citizen travel within the Schengen area without identity documents?
Could I be denied entry into Ireland due to medical and police situations during a previous UK visit?
The qvolume of an integer
What does it mean when you think without speaking?
What are the slash markings on Gatwick's 08R/26L?
What is game ban VS VAC ban in steam?
Mother abusing my finances
What does the behaviour of water on the skin of an aircraft in flight tell us?
multiline equation inside a matrix that is a part of multiline equation
Multiline equation and textMultiline equation with LHS alone on first line?Multiline equation without numbermultiline equation inside newglossaryentryAligning equation including multiline expressionsAligning Multiline Matrix EquationsMultiline equation inside a split environmentWriting matrix inside an equationSplitting a long text in an equationProblem splitting/fitting equation
I have an equation split to multiple lines.
But the last line of the multiline equation contains 2x1 vector with long equations that go out of margin.
How do I further split the equations in the vector so that they do go over margin and look visually pleasing?
beginequation labeleq:7
beginsplit
mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
&=beginbmatrix tanhBig(w^ro_1,1cdotalphacdot tanhbig(w^ir_1,1cdot x_1(1)+w^ir_2,1cdot x_2(1)big) + w^ro_2,1cdot alpha cdot tanhbig(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)big) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Big) \ tanhBig(w^ro_1,2cdot alpha cdot tanhbig(w^ir_1,1cdot x_1(1)+w^ir_2,1cdot x_2(1)big) + w^ro_2,2cdot alpha cdot tanhbig(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)big) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Big) endbmatrix.
endsplit
endequation
Current output looks like below where good portion of equations go over margin:
Any help will be greatly appreciated
equations split multline
add a comment |
I have an equation split to multiple lines.
But the last line of the multiline equation contains 2x1 vector with long equations that go out of margin.
How do I further split the equations in the vector so that they do go over margin and look visually pleasing?
beginequation labeleq:7
beginsplit
mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
&=beginbmatrix tanhBig(w^ro_1,1cdotalphacdot tanhbig(w^ir_1,1cdot x_1(1)+w^ir_2,1cdot x_2(1)big) + w^ro_2,1cdot alpha cdot tanhbig(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)big) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Big) \ tanhBig(w^ro_1,2cdot alpha cdot tanhbig(w^ir_1,1cdot x_1(1)+w^ir_2,1cdot x_2(1)big) + w^ro_2,2cdot alpha cdot tanhbig(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)big) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Big) endbmatrix.
endsplit
endequation
Current output looks like below where good portion of equations go over margin:
Any help will be greatly appreciated
equations split multline
Any news? Is any of received answers the most acceptable to you? If it, please click on check mark at top left side of selected answer. As I have seen, so far you not accept any answer on your question ;-(.
– Zarko
May 19 at 23:07
add a comment |
I have an equation split to multiple lines.
But the last line of the multiline equation contains 2x1 vector with long equations that go out of margin.
How do I further split the equations in the vector so that they do go over margin and look visually pleasing?
beginequation labeleq:7
beginsplit
mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
&=beginbmatrix tanhBig(w^ro_1,1cdotalphacdot tanhbig(w^ir_1,1cdot x_1(1)+w^ir_2,1cdot x_2(1)big) + w^ro_2,1cdot alpha cdot tanhbig(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)big) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Big) \ tanhBig(w^ro_1,2cdot alpha cdot tanhbig(w^ir_1,1cdot x_1(1)+w^ir_2,1cdot x_2(1)big) + w^ro_2,2cdot alpha cdot tanhbig(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)big) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Big) endbmatrix.
endsplit
endequation
Current output looks like below where good portion of equations go over margin:
Any help will be greatly appreciated
equations split multline
I have an equation split to multiple lines.
But the last line of the multiline equation contains 2x1 vector with long equations that go out of margin.
How do I further split the equations in the vector so that they do go over margin and look visually pleasing?
beginequation labeleq:7
beginsplit
mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
&=beginbmatrix tanhBig(w^ro_1,1cdotalphacdot tanhbig(w^ir_1,1cdot x_1(1)+w^ir_2,1cdot x_2(1)big) + w^ro_2,1cdot alpha cdot tanhbig(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)big) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Big) \ tanhBig(w^ro_1,2cdot alpha cdot tanhbig(w^ir_1,1cdot x_1(1)+w^ir_2,1cdot x_2(1)big) + w^ro_2,2cdot alpha cdot tanhbig(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)big) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Big) endbmatrix.
endsplit
endequation
Current output looks like below where good portion of equations go over margin:
Any help will be greatly appreciated
equations split multline
equations split multline
asked May 15 at 19:34
user32147user32147
1462
1462
Any news? Is any of received answers the most acceptable to you? If it, please click on check mark at top left side of selected answer. As I have seen, so far you not accept any answer on your question ;-(.
– Zarko
May 19 at 23:07
add a comment |
Any news? Is any of received answers the most acceptable to you? If it, please click on check mark at top left side of selected answer. As I have seen, so far you not accept any answer on your question ;-(.
– Zarko
May 19 at 23:07
Any news? Is any of received answers the most acceptable to you? If it, please click on check mark at top left side of selected answer. As I have seen, so far you not accept any answer on your question ;-(.
– Zarko
May 19 at 23:07
Any news? Is any of received answers the most acceptable to you? If it, please click on check mark at top left side of selected answer. As I have seen, so far you not accept any answer on your question ;-(.
– Zarko
May 19 at 23:07
add a comment |
3 Answers
3
active
oldest
votes
You can break lines within a matrix by useing of multlined
from the mathtools
package:
documentclassarticle
usepackagegeometry
usepackagemathtools
begindocument
beginequation labeleq:7
beginsplit
mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
& = beginbmatrix
beginmultlined
tanhBigl(w^ro_1,1cdotalphacdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
+ w^ro_2,1cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1) + w^ir_2,2 cdot x_2(1)bigr) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Bigr)
endmultlined \[4ex]
%
beginmultlined
tanhBigl(w^ro_1,2cdot alpha cdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
+ w^ro_2,2cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)bigr) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Bigr)
endmultlined
endbmatrix.
endsplit
endequation
enddocument
note: I try to fix of use Big(
and big(
. More correct is Bigl(
and bigl(
and Bigr)
and bigr)
. most of the math operators are defined, so instead ˙tanh
you should use tanh
which write it correct mathrm
font. I also reduce width of cdots
enclosing them in curly braces. Do you really need them?
Thank you for correcting usage of other natations. This is really helpful! I initially didn't havecdots
but I feel like including them makes it more readable. Doescdot
have smaller width compared to just plaincdot
?
– user32147
May 16 at 1:10
add a comment |
Here there is my proposal:
documentclass[a4paper,12pt]article
usepackagemathtools,amssymb
usepackage[left=1in,right=.3in]geometry
begindocument
beginequation labeleq:7
beginaligned
mathbfy(1)&=tanh(mathbfW^mathrmrocdotmathbfh(1)+mathbfW^mathrmiocdotmathbfx(1)) \
&=beginbmatrix tanhBig((w^mathrmmathrmro_1,1cdotalphacdot tanhmu) + w^mathrmro_2,1cdot alpha cdot tanh lambda + w^mathrmio_1,1 cdot x_1(1)+w^mathrmio_2,1 cdot x_2(1)Big) \
tanh Big((w^mathrmro_1,2cdot alpha cdot tanhmu) + w^mathrmro_2,2cdot alpha cdot tanh lambda + w^mathrmio_1,2cdot x_1(1)+w^mathrmio_2,2cdot x_2(1)Big) endbmatrix
endaligned
endequation
where $mu=(w^mathrmir_1,1cdot x_1(1)+w^mathrmir_2,1cdot x_2(1))$ and $lambda=(w^mathrmir_1,2cdot x_1(1)+w^mathrmir_2,2 cdot x_2(1))$
enddocument
i see, that now i need new glasses :-). fonts are so tiny ... anyway +1
– Zarko
May 15 at 20:30
@Zarko I have edited my code. Maybe this one's better.
– Sebastiano
May 15 at 22:36
this is definitely the best solution; downvote (not me) was probably because it does not answer the OP's question
– Brandon Kuczenski
May 15 at 23:06
1
@Sebastiano, yes, now is better! i can read now without magnifying glass :-) :-) :-)
– Zarko
May 15 at 23:42
1
Thank you! I really appreciate the help.
– user32147
May 16 at 1:14
|
show 2 more comments
I propose this layout, which doesn't require multiline equations inside matrix. Instead, I suppressed the cdot
s (unnecessary, from my point of view) and used the mmatrix
(medium-size matrix) environment from nccmath
, and the fleqn
environment (same package). This size remains readable, as it is ~80 % of displaystyle.
documentclassarticle
usepackage[showframe]geometry
usepackagemathtools, nccmath
begindocument
vspace*1cm
beginfleqn
beginequation
beginaligned[b] labeleq:7
&mathbfy(1)=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) = \
& beginmmatrix beginbmatrix
tanhBigl(w^ro_1,1 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
+ w^ro_2,1 alpha tanhbigl(w^ir_1,2 x_1(1) + w^ir_2,2 x_2(1)bigr) + w^io_1,1 x_1(1)+w^io_2,1 x_2(1)Bigr)
\
%
tanhBigl(w^ro_1,2 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
+ w^ro_2,2 alpha tanhbigl(w^ir_1,2 x_1(1)+w^ir_2,2 x_2(1)bigr) + w^io_1,2 x_1(1)+w^io_2,2 x_2(1)Bigr)
endbmatrix
endmmatrix
endaligned
endequation
endfleqn
enddocument
thank you for the suggestion! this is really helpful!
– user32147
May 16 at 1:07
initially I was able to fit the matrix in one line withoutcdot
but I decided to putcdot
as I feel like the equation is easier to parse and read with them.
– user32147
May 16 at 1:16
add a comment |
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',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
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
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f491032%2fmultiline-equation-inside-a-matrix-that-is-a-part-of-multiline-equation%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can break lines within a matrix by useing of multlined
from the mathtools
package:
documentclassarticle
usepackagegeometry
usepackagemathtools
begindocument
beginequation labeleq:7
beginsplit
mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
& = beginbmatrix
beginmultlined
tanhBigl(w^ro_1,1cdotalphacdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
+ w^ro_2,1cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1) + w^ir_2,2 cdot x_2(1)bigr) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Bigr)
endmultlined \[4ex]
%
beginmultlined
tanhBigl(w^ro_1,2cdot alpha cdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
+ w^ro_2,2cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)bigr) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Bigr)
endmultlined
endbmatrix.
endsplit
endequation
enddocument
note: I try to fix of use Big(
and big(
. More correct is Bigl(
and bigl(
and Bigr)
and bigr)
. most of the math operators are defined, so instead ˙tanh
you should use tanh
which write it correct mathrm
font. I also reduce width of cdots
enclosing them in curly braces. Do you really need them?
Thank you for correcting usage of other natations. This is really helpful! I initially didn't havecdots
but I feel like including them makes it more readable. Doescdot
have smaller width compared to just plaincdot
?
– user32147
May 16 at 1:10
add a comment |
You can break lines within a matrix by useing of multlined
from the mathtools
package:
documentclassarticle
usepackagegeometry
usepackagemathtools
begindocument
beginequation labeleq:7
beginsplit
mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
& = beginbmatrix
beginmultlined
tanhBigl(w^ro_1,1cdotalphacdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
+ w^ro_2,1cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1) + w^ir_2,2 cdot x_2(1)bigr) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Bigr)
endmultlined \[4ex]
%
beginmultlined
tanhBigl(w^ro_1,2cdot alpha cdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
+ w^ro_2,2cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)bigr) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Bigr)
endmultlined
endbmatrix.
endsplit
endequation
enddocument
note: I try to fix of use Big(
and big(
. More correct is Bigl(
and bigl(
and Bigr)
and bigr)
. most of the math operators are defined, so instead ˙tanh
you should use tanh
which write it correct mathrm
font. I also reduce width of cdots
enclosing them in curly braces. Do you really need them?
Thank you for correcting usage of other natations. This is really helpful! I initially didn't havecdots
but I feel like including them makes it more readable. Doescdot
have smaller width compared to just plaincdot
?
– user32147
May 16 at 1:10
add a comment |
You can break lines within a matrix by useing of multlined
from the mathtools
package:
documentclassarticle
usepackagegeometry
usepackagemathtools
begindocument
beginequation labeleq:7
beginsplit
mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
& = beginbmatrix
beginmultlined
tanhBigl(w^ro_1,1cdotalphacdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
+ w^ro_2,1cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1) + w^ir_2,2 cdot x_2(1)bigr) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Bigr)
endmultlined \[4ex]
%
beginmultlined
tanhBigl(w^ro_1,2cdot alpha cdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
+ w^ro_2,2cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)bigr) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Bigr)
endmultlined
endbmatrix.
endsplit
endequation
enddocument
note: I try to fix of use Big(
and big(
. More correct is Bigl(
and bigl(
and Bigr)
and bigr)
. most of the math operators are defined, so instead ˙tanh
you should use tanh
which write it correct mathrm
font. I also reduce width of cdots
enclosing them in curly braces. Do you really need them?
You can break lines within a matrix by useing of multlined
from the mathtools
package:
documentclassarticle
usepackagegeometry
usepackagemathtools
begindocument
beginequation labeleq:7
beginsplit
mathbfy(1)&=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) \
& = beginbmatrix
beginmultlined
tanhBigl(w^ro_1,1cdotalphacdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
+ w^ro_2,1cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1) + w^ir_2,2 cdot x_2(1)bigr) + w^io_1,1 cdot x_1(1)+w^io_2,1 cdot x_2(1)Bigr)
endmultlined \[4ex]
%
beginmultlined
tanhBigl(w^ro_1,2cdot alpha cdot tanhbigl(w^ir_1,1cdot x_1(1) + w^ir_2,1cdot x_2(1)bigr) \[-2ex]
+ w^ro_2,2cdot alpha cdot tanhbigl(w^ir_1,2cdot x_1(1)+w^ir_2,2 cdot x_2(1)bigr) + w^io_1,2cdot x_1(1)+w^io_2,2cdot x_2(1)Bigr)
endmultlined
endbmatrix.
endsplit
endequation
enddocument
note: I try to fix of use Big(
and big(
. More correct is Bigl(
and bigl(
and Bigr)
and bigr)
. most of the math operators are defined, so instead ˙tanh
you should use tanh
which write it correct mathrm
font. I also reduce width of cdots
enclosing them in curly braces. Do you really need them?
edited May 15 at 20:34
answered May 15 at 20:02
ZarkoZarko
135k872180
135k872180
Thank you for correcting usage of other natations. This is really helpful! I initially didn't havecdots
but I feel like including them makes it more readable. Doescdot
have smaller width compared to just plaincdot
?
– user32147
May 16 at 1:10
add a comment |
Thank you for correcting usage of other natations. This is really helpful! I initially didn't havecdots
but I feel like including them makes it more readable. Doescdot
have smaller width compared to just plaincdot
?
– user32147
May 16 at 1:10
Thank you for correcting usage of other natations. This is really helpful! I initially didn't have
cdots
but I feel like including them makes it more readable. Does cdot
have smaller width compared to just plain cdot
?– user32147
May 16 at 1:10
Thank you for correcting usage of other natations. This is really helpful! I initially didn't have
cdots
but I feel like including them makes it more readable. Does cdot
have smaller width compared to just plain cdot
?– user32147
May 16 at 1:10
add a comment |
Here there is my proposal:
documentclass[a4paper,12pt]article
usepackagemathtools,amssymb
usepackage[left=1in,right=.3in]geometry
begindocument
beginequation labeleq:7
beginaligned
mathbfy(1)&=tanh(mathbfW^mathrmrocdotmathbfh(1)+mathbfW^mathrmiocdotmathbfx(1)) \
&=beginbmatrix tanhBig((w^mathrmmathrmro_1,1cdotalphacdot tanhmu) + w^mathrmro_2,1cdot alpha cdot tanh lambda + w^mathrmio_1,1 cdot x_1(1)+w^mathrmio_2,1 cdot x_2(1)Big) \
tanh Big((w^mathrmro_1,2cdot alpha cdot tanhmu) + w^mathrmro_2,2cdot alpha cdot tanh lambda + w^mathrmio_1,2cdot x_1(1)+w^mathrmio_2,2cdot x_2(1)Big) endbmatrix
endaligned
endequation
where $mu=(w^mathrmir_1,1cdot x_1(1)+w^mathrmir_2,1cdot x_2(1))$ and $lambda=(w^mathrmir_1,2cdot x_1(1)+w^mathrmir_2,2 cdot x_2(1))$
enddocument
i see, that now i need new glasses :-). fonts are so tiny ... anyway +1
– Zarko
May 15 at 20:30
@Zarko I have edited my code. Maybe this one's better.
– Sebastiano
May 15 at 22:36
this is definitely the best solution; downvote (not me) was probably because it does not answer the OP's question
– Brandon Kuczenski
May 15 at 23:06
1
@Sebastiano, yes, now is better! i can read now without magnifying glass :-) :-) :-)
– Zarko
May 15 at 23:42
1
Thank you! I really appreciate the help.
– user32147
May 16 at 1:14
|
show 2 more comments
Here there is my proposal:
documentclass[a4paper,12pt]article
usepackagemathtools,amssymb
usepackage[left=1in,right=.3in]geometry
begindocument
beginequation labeleq:7
beginaligned
mathbfy(1)&=tanh(mathbfW^mathrmrocdotmathbfh(1)+mathbfW^mathrmiocdotmathbfx(1)) \
&=beginbmatrix tanhBig((w^mathrmmathrmro_1,1cdotalphacdot tanhmu) + w^mathrmro_2,1cdot alpha cdot tanh lambda + w^mathrmio_1,1 cdot x_1(1)+w^mathrmio_2,1 cdot x_2(1)Big) \
tanh Big((w^mathrmro_1,2cdot alpha cdot tanhmu) + w^mathrmro_2,2cdot alpha cdot tanh lambda + w^mathrmio_1,2cdot x_1(1)+w^mathrmio_2,2cdot x_2(1)Big) endbmatrix
endaligned
endequation
where $mu=(w^mathrmir_1,1cdot x_1(1)+w^mathrmir_2,1cdot x_2(1))$ and $lambda=(w^mathrmir_1,2cdot x_1(1)+w^mathrmir_2,2 cdot x_2(1))$
enddocument
i see, that now i need new glasses :-). fonts are so tiny ... anyway +1
– Zarko
May 15 at 20:30
@Zarko I have edited my code. Maybe this one's better.
– Sebastiano
May 15 at 22:36
this is definitely the best solution; downvote (not me) was probably because it does not answer the OP's question
– Brandon Kuczenski
May 15 at 23:06
1
@Sebastiano, yes, now is better! i can read now without magnifying glass :-) :-) :-)
– Zarko
May 15 at 23:42
1
Thank you! I really appreciate the help.
– user32147
May 16 at 1:14
|
show 2 more comments
Here there is my proposal:
documentclass[a4paper,12pt]article
usepackagemathtools,amssymb
usepackage[left=1in,right=.3in]geometry
begindocument
beginequation labeleq:7
beginaligned
mathbfy(1)&=tanh(mathbfW^mathrmrocdotmathbfh(1)+mathbfW^mathrmiocdotmathbfx(1)) \
&=beginbmatrix tanhBig((w^mathrmmathrmro_1,1cdotalphacdot tanhmu) + w^mathrmro_2,1cdot alpha cdot tanh lambda + w^mathrmio_1,1 cdot x_1(1)+w^mathrmio_2,1 cdot x_2(1)Big) \
tanh Big((w^mathrmro_1,2cdot alpha cdot tanhmu) + w^mathrmro_2,2cdot alpha cdot tanh lambda + w^mathrmio_1,2cdot x_1(1)+w^mathrmio_2,2cdot x_2(1)Big) endbmatrix
endaligned
endequation
where $mu=(w^mathrmir_1,1cdot x_1(1)+w^mathrmir_2,1cdot x_2(1))$ and $lambda=(w^mathrmir_1,2cdot x_1(1)+w^mathrmir_2,2 cdot x_2(1))$
enddocument
Here there is my proposal:
documentclass[a4paper,12pt]article
usepackagemathtools,amssymb
usepackage[left=1in,right=.3in]geometry
begindocument
beginequation labeleq:7
beginaligned
mathbfy(1)&=tanh(mathbfW^mathrmrocdotmathbfh(1)+mathbfW^mathrmiocdotmathbfx(1)) \
&=beginbmatrix tanhBig((w^mathrmmathrmro_1,1cdotalphacdot tanhmu) + w^mathrmro_2,1cdot alpha cdot tanh lambda + w^mathrmio_1,1 cdot x_1(1)+w^mathrmio_2,1 cdot x_2(1)Big) \
tanh Big((w^mathrmro_1,2cdot alpha cdot tanhmu) + w^mathrmro_2,2cdot alpha cdot tanh lambda + w^mathrmio_1,2cdot x_1(1)+w^mathrmio_2,2cdot x_2(1)Big) endbmatrix
endaligned
endequation
where $mu=(w^mathrmir_1,1cdot x_1(1)+w^mathrmir_2,1cdot x_2(1))$ and $lambda=(w^mathrmir_1,2cdot x_1(1)+w^mathrmir_2,2 cdot x_2(1))$
enddocument
edited May 15 at 22:51
answered May 15 at 20:15
SebastianoSebastiano
12.6k42570
12.6k42570
i see, that now i need new glasses :-). fonts are so tiny ... anyway +1
– Zarko
May 15 at 20:30
@Zarko I have edited my code. Maybe this one's better.
– Sebastiano
May 15 at 22:36
this is definitely the best solution; downvote (not me) was probably because it does not answer the OP's question
– Brandon Kuczenski
May 15 at 23:06
1
@Sebastiano, yes, now is better! i can read now without magnifying glass :-) :-) :-)
– Zarko
May 15 at 23:42
1
Thank you! I really appreciate the help.
– user32147
May 16 at 1:14
|
show 2 more comments
i see, that now i need new glasses :-). fonts are so tiny ... anyway +1
– Zarko
May 15 at 20:30
@Zarko I have edited my code. Maybe this one's better.
– Sebastiano
May 15 at 22:36
this is definitely the best solution; downvote (not me) was probably because it does not answer the OP's question
– Brandon Kuczenski
May 15 at 23:06
1
@Sebastiano, yes, now is better! i can read now without magnifying glass :-) :-) :-)
– Zarko
May 15 at 23:42
1
Thank you! I really appreciate the help.
– user32147
May 16 at 1:14
i see, that now i need new glasses :-). fonts are so tiny ... anyway +1
– Zarko
May 15 at 20:30
i see, that now i need new glasses :-). fonts are so tiny ... anyway +1
– Zarko
May 15 at 20:30
@Zarko I have edited my code. Maybe this one's better.
– Sebastiano
May 15 at 22:36
@Zarko I have edited my code. Maybe this one's better.
– Sebastiano
May 15 at 22:36
this is definitely the best solution; downvote (not me) was probably because it does not answer the OP's question
– Brandon Kuczenski
May 15 at 23:06
this is definitely the best solution; downvote (not me) was probably because it does not answer the OP's question
– Brandon Kuczenski
May 15 at 23:06
1
1
@Sebastiano, yes, now is better! i can read now without magnifying glass :-) :-) :-)
– Zarko
May 15 at 23:42
@Sebastiano, yes, now is better! i can read now without magnifying glass :-) :-) :-)
– Zarko
May 15 at 23:42
1
1
Thank you! I really appreciate the help.
– user32147
May 16 at 1:14
Thank you! I really appreciate the help.
– user32147
May 16 at 1:14
|
show 2 more comments
I propose this layout, which doesn't require multiline equations inside matrix. Instead, I suppressed the cdot
s (unnecessary, from my point of view) and used the mmatrix
(medium-size matrix) environment from nccmath
, and the fleqn
environment (same package). This size remains readable, as it is ~80 % of displaystyle.
documentclassarticle
usepackage[showframe]geometry
usepackagemathtools, nccmath
begindocument
vspace*1cm
beginfleqn
beginequation
beginaligned[b] labeleq:7
&mathbfy(1)=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) = \
& beginmmatrix beginbmatrix
tanhBigl(w^ro_1,1 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
+ w^ro_2,1 alpha tanhbigl(w^ir_1,2 x_1(1) + w^ir_2,2 x_2(1)bigr) + w^io_1,1 x_1(1)+w^io_2,1 x_2(1)Bigr)
\
%
tanhBigl(w^ro_1,2 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
+ w^ro_2,2 alpha tanhbigl(w^ir_1,2 x_1(1)+w^ir_2,2 x_2(1)bigr) + w^io_1,2 x_1(1)+w^io_2,2 x_2(1)Bigr)
endbmatrix
endmmatrix
endaligned
endequation
endfleqn
enddocument
thank you for the suggestion! this is really helpful!
– user32147
May 16 at 1:07
initially I was able to fit the matrix in one line withoutcdot
but I decided to putcdot
as I feel like the equation is easier to parse and read with them.
– user32147
May 16 at 1:16
add a comment |
I propose this layout, which doesn't require multiline equations inside matrix. Instead, I suppressed the cdot
s (unnecessary, from my point of view) and used the mmatrix
(medium-size matrix) environment from nccmath
, and the fleqn
environment (same package). This size remains readable, as it is ~80 % of displaystyle.
documentclassarticle
usepackage[showframe]geometry
usepackagemathtools, nccmath
begindocument
vspace*1cm
beginfleqn
beginequation
beginaligned[b] labeleq:7
&mathbfy(1)=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) = \
& beginmmatrix beginbmatrix
tanhBigl(w^ro_1,1 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
+ w^ro_2,1 alpha tanhbigl(w^ir_1,2 x_1(1) + w^ir_2,2 x_2(1)bigr) + w^io_1,1 x_1(1)+w^io_2,1 x_2(1)Bigr)
\
%
tanhBigl(w^ro_1,2 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
+ w^ro_2,2 alpha tanhbigl(w^ir_1,2 x_1(1)+w^ir_2,2 x_2(1)bigr) + w^io_1,2 x_1(1)+w^io_2,2 x_2(1)Bigr)
endbmatrix
endmmatrix
endaligned
endequation
endfleqn
enddocument
thank you for the suggestion! this is really helpful!
– user32147
May 16 at 1:07
initially I was able to fit the matrix in one line withoutcdot
but I decided to putcdot
as I feel like the equation is easier to parse and read with them.
– user32147
May 16 at 1:16
add a comment |
I propose this layout, which doesn't require multiline equations inside matrix. Instead, I suppressed the cdot
s (unnecessary, from my point of view) and used the mmatrix
(medium-size matrix) environment from nccmath
, and the fleqn
environment (same package). This size remains readable, as it is ~80 % of displaystyle.
documentclassarticle
usepackage[showframe]geometry
usepackagemathtools, nccmath
begindocument
vspace*1cm
beginfleqn
beginequation
beginaligned[b] labeleq:7
&mathbfy(1)=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) = \
& beginmmatrix beginbmatrix
tanhBigl(w^ro_1,1 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
+ w^ro_2,1 alpha tanhbigl(w^ir_1,2 x_1(1) + w^ir_2,2 x_2(1)bigr) + w^io_1,1 x_1(1)+w^io_2,1 x_2(1)Bigr)
\
%
tanhBigl(w^ro_1,2 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
+ w^ro_2,2 alpha tanhbigl(w^ir_1,2 x_1(1)+w^ir_2,2 x_2(1)bigr) + w^io_1,2 x_1(1)+w^io_2,2 x_2(1)Bigr)
endbmatrix
endmmatrix
endaligned
endequation
endfleqn
enddocument
I propose this layout, which doesn't require multiline equations inside matrix. Instead, I suppressed the cdot
s (unnecessary, from my point of view) and used the mmatrix
(medium-size matrix) environment from nccmath
, and the fleqn
environment (same package). This size remains readable, as it is ~80 % of displaystyle.
documentclassarticle
usepackage[showframe]geometry
usepackagemathtools, nccmath
begindocument
vspace*1cm
beginfleqn
beginequation
beginaligned[b] labeleq:7
&mathbfy(1)=tanh(mathbfW^rocdotmathbfh(1)+mathbfW^iocdotmathbfx(1)) = \
& beginmmatrix beginbmatrix
tanhBigl(w^ro_1,1 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
+ w^ro_2,1 alpha tanhbigl(w^ir_1,2 x_1(1) + w^ir_2,2 x_2(1)bigr) + w^io_1,1 x_1(1)+w^io_2,1 x_2(1)Bigr)
\
%
tanhBigl(w^ro_1,2 alpha tanhbigl(w^ir_1,1 x_1(1) + w^ir_2,1 x_2(1)bigr)
+ w^ro_2,2 alpha tanhbigl(w^ir_1,2 x_1(1)+w^ir_2,2 x_2(1)bigr) + w^io_1,2 x_1(1)+w^io_2,2 x_2(1)Bigr)
endbmatrix
endmmatrix
endaligned
endequation
endfleqn
enddocument
answered May 15 at 21:16
BernardBernard
180k780212
180k780212
thank you for the suggestion! this is really helpful!
– user32147
May 16 at 1:07
initially I was able to fit the matrix in one line withoutcdot
but I decided to putcdot
as I feel like the equation is easier to parse and read with them.
– user32147
May 16 at 1:16
add a comment |
thank you for the suggestion! this is really helpful!
– user32147
May 16 at 1:07
initially I was able to fit the matrix in one line withoutcdot
but I decided to putcdot
as I feel like the equation is easier to parse and read with them.
– user32147
May 16 at 1:16
thank you for the suggestion! this is really helpful!
– user32147
May 16 at 1:07
thank you for the suggestion! this is really helpful!
– user32147
May 16 at 1:07
initially I was able to fit the matrix in one line without
cdot
but I decided to put cdot
as I feel like the equation is easier to parse and read with them.– user32147
May 16 at 1:16
initially I was able to fit the matrix in one line without
cdot
but I decided to put cdot
as I feel like the equation is easier to parse and read with them.– user32147
May 16 at 1:16
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f491032%2fmultiline-equation-inside-a-matrix-that-is-a-part-of-multiline-equation%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Any news? Is any of received answers the most acceptable to you? If it, please click on check mark at top left side of selected answer. As I have seen, so far you not accept any answer on your question ;-(.
– Zarko
May 19 at 23:07