Align text in a cases environment with text outsideHow can I align multiple cases environment...
Facing a paradox: Earnshaw's theorem in one dimension
How could indestructible materials be used in power generation?
Famous Pre Reformation Christian Pastors (Non Catholic and Non Orthodox)
Alternative to sending password over mail?
Can a rocket refuel on Mars from water?
Did Shadowfax go to Valinor?
Is it legal for company to use my work email to pretend I still work there?
What killed these X2 caps?
In Romance of the Three Kingdoms why do people still use bamboo sticks when papers are already invented?
I'm flying to France today and my passport expires in less than 2 months
Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?
Does a druid starting with a bow start with no arrows?
If human space travel is limited by the G force vulnerability, is there a way to counter G forces?
UK: Is there precedent for the governments e-petition site changing the direction of a government decision?
How to draw the figure with four pentagons?
Neighboring nodes in the network
Fully-Firstable Anagram Sets
Withdrawals from HSA
How can I make my BBEG immortal short of making them a Lich or Vampire?
Where does SFDX store details about scratch orgs?
Why does Arabsat 6A need a Falcon Heavy to launch
Can a virus destroy the BIOS of a modern computer?
1960's book about a plague that kills all white people
Is it possible to create light that imparts a greater proportion of its energy as momentum rather than heat?
Align text in a cases environment with text outside
How can I align multiple cases environment simultaneously?Bad formating with align + cases and long equationsTwo cases brackets in one line, aligned to a formula in a second linealignat with right curly bracket/cases spanning some but not all linesAligning labels inside cases environmentNumbering of each equation within cases with left alignment (both on the page and within the equations)How to align two begin{equation}begin{cases}?Alignment and dotfill in casesDotfill inside cases in enumerateAligning multiple equations (which involve cases) at multiple places
If want to align the code such that all the `if ...' part are also aligned. But I can't make it happen, because two of the three equations are in a cases environment and the other one isn't.
begin{align}
g^B(x)&=
begin{cases}
T & text{if $x$ is $tr$,} \
F & text{if $x$ is $fa$.}
end{cases}\
g^ell (x)&=
a xor g^B(z) &text{if $x = ylef a rig z$}\
g^B(x)&=
begin{cases}
T & text{if $x$ is $tr$,} \
F & text{if $x$ is $fa$.}
end{cases}
end{align}

cases alignment
New contributor
Sven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
If want to align the code such that all the `if ...' part are also aligned. But I can't make it happen, because two of the three equations are in a cases environment and the other one isn't.
begin{align}
g^B(x)&=
begin{cases}
T & text{if $x$ is $tr$,} \
F & text{if $x$ is $fa$.}
end{cases}\
g^ell (x)&=
a xor g^B(z) &text{if $x = ylef a rig z$}\
g^B(x)&=
begin{cases}
T & text{if $x$ is $tr$,} \
F & text{if $x$ is $fa$.}
end{cases}
end{align}

cases alignment
New contributor
Sven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
If want to align the code such that all the `if ...' part are also aligned. But I can't make it happen, because two of the three equations are in a cases environment and the other one isn't.
begin{align}
g^B(x)&=
begin{cases}
T & text{if $x$ is $tr$,} \
F & text{if $x$ is $fa$.}
end{cases}\
g^ell (x)&=
a xor g^B(z) &text{if $x = ylef a rig z$}\
g^B(x)&=
begin{cases}
T & text{if $x$ is $tr$,} \
F & text{if $x$ is $fa$.}
end{cases}
end{align}

cases alignment
New contributor
Sven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
If want to align the code such that all the `if ...' part are also aligned. But I can't make it happen, because two of the three equations are in a cases environment and the other one isn't.
begin{align}
g^B(x)&=
begin{cases}
T & text{if $x$ is $tr$,} \
F & text{if $x$ is $fa$.}
end{cases}\
g^ell (x)&=
a xor g^B(z) &text{if $x = ylef a rig z$}\
g^B(x)&=
begin{cases}
T & text{if $x$ is $tr$,} \
F & text{if $x$ is $fa$.}
end{cases}
end{align}

cases alignment
cases alignment
New contributor
Sven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Sven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Sven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 4 hours ago
SvenSven
61
61
New contributor
Sven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Sven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Sven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Welcome to TeX-SE! We usually provide complete compilable examples that start with documentclass and end with end{document}. I did not have your definitions fa and so on so I replaced them with random stuff. If I had them, this would not be necessary. As for your question, one way is to use blkarray.
documentclass{article}
usepackage{blkarray}
usepackage{multirow}
usepackage{amsmath}
begin{document}
[begin{blockarray}{rll}
begin{block}{r{ll}
multirow{2}{*}{$g^B(x)=$}&
$T$ & text{if $x$ is $x$,} \
& $F$ & text{if $x$ is $x$.}\
end{block}
g^ell (x)=&
a wedge g^B(z) & text{if $x = ydots a dots z$}\
begin{block}{r{ll}
multirow{2}{*}{$g^B(x)=$}&
$T $& text{if $x$ is $x$,} \
& $F$ & text{if $x$ is $x$.}\
end{block}
end{blockarray}]
end{document}

add a comment |
A solution based on alignedat:
documentclass{article}
usepackage{blkarray}
usepackage{multirow}
usepackage{amsmath, amssymb}
usepackage{stackengine}
newcommand{xor}{mathrel{stackMathstackinset{l}{-1pt}{c}{0pt}{scriptscriptstylebullet}{ + }}}
begin{document}
begin{alignat}{2}
g^B(x )& = begin{cases}T \ F end{cases}
& &begin{aligned}
& text{if } x text{ is }mathsf{T}, \
& text{if } x text{ is }mathsf{F}.
end{aligned} \
g^ell (x) & = a xor
g^B(z) &qquad & text{if }x = ytriangleleft a triangleright z \
g^B(x )& = begin{cases}T \ F end{cases}
& &begin{aligned}
& text{if } x text{ is }mathsf{T}, \%
& text{if } x text{ is }mathsf{F}.
end{aligned}
end{alignat}
end{document}

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
});
}
});
Sven 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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f483234%2falign-text-in-a-cases-environment-with-text-outside%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Welcome to TeX-SE! We usually provide complete compilable examples that start with documentclass and end with end{document}. I did not have your definitions fa and so on so I replaced them with random stuff. If I had them, this would not be necessary. As for your question, one way is to use blkarray.
documentclass{article}
usepackage{blkarray}
usepackage{multirow}
usepackage{amsmath}
begin{document}
[begin{blockarray}{rll}
begin{block}{r{ll}
multirow{2}{*}{$g^B(x)=$}&
$T$ & text{if $x$ is $x$,} \
& $F$ & text{if $x$ is $x$.}\
end{block}
g^ell (x)=&
a wedge g^B(z) & text{if $x = ydots a dots z$}\
begin{block}{r{ll}
multirow{2}{*}{$g^B(x)=$}&
$T $& text{if $x$ is $x$,} \
& $F$ & text{if $x$ is $x$.}\
end{block}
end{blockarray}]
end{document}

add a comment |
Welcome to TeX-SE! We usually provide complete compilable examples that start with documentclass and end with end{document}. I did not have your definitions fa and so on so I replaced them with random stuff. If I had them, this would not be necessary. As for your question, one way is to use blkarray.
documentclass{article}
usepackage{blkarray}
usepackage{multirow}
usepackage{amsmath}
begin{document}
[begin{blockarray}{rll}
begin{block}{r{ll}
multirow{2}{*}{$g^B(x)=$}&
$T$ & text{if $x$ is $x$,} \
& $F$ & text{if $x$ is $x$.}\
end{block}
g^ell (x)=&
a wedge g^B(z) & text{if $x = ydots a dots z$}\
begin{block}{r{ll}
multirow{2}{*}{$g^B(x)=$}&
$T $& text{if $x$ is $x$,} \
& $F$ & text{if $x$ is $x$.}\
end{block}
end{blockarray}]
end{document}

add a comment |
Welcome to TeX-SE! We usually provide complete compilable examples that start with documentclass and end with end{document}. I did not have your definitions fa and so on so I replaced them with random stuff. If I had them, this would not be necessary. As for your question, one way is to use blkarray.
documentclass{article}
usepackage{blkarray}
usepackage{multirow}
usepackage{amsmath}
begin{document}
[begin{blockarray}{rll}
begin{block}{r{ll}
multirow{2}{*}{$g^B(x)=$}&
$T$ & text{if $x$ is $x$,} \
& $F$ & text{if $x$ is $x$.}\
end{block}
g^ell (x)=&
a wedge g^B(z) & text{if $x = ydots a dots z$}\
begin{block}{r{ll}
multirow{2}{*}{$g^B(x)=$}&
$T $& text{if $x$ is $x$,} \
& $F$ & text{if $x$ is $x$.}\
end{block}
end{blockarray}]
end{document}

Welcome to TeX-SE! We usually provide complete compilable examples that start with documentclass and end with end{document}. I did not have your definitions fa and so on so I replaced them with random stuff. If I had them, this would not be necessary. As for your question, one way is to use blkarray.
documentclass{article}
usepackage{blkarray}
usepackage{multirow}
usepackage{amsmath}
begin{document}
[begin{blockarray}{rll}
begin{block}{r{ll}
multirow{2}{*}{$g^B(x)=$}&
$T$ & text{if $x$ is $x$,} \
& $F$ & text{if $x$ is $x$.}\
end{block}
g^ell (x)=&
a wedge g^B(z) & text{if $x = ydots a dots z$}\
begin{block}{r{ll}
multirow{2}{*}{$g^B(x)=$}&
$T $& text{if $x$ is $x$,} \
& $F$ & text{if $x$ is $x$.}\
end{block}
end{blockarray}]
end{document}

answered 4 hours ago
marmotmarmot
114k5145276
114k5145276
add a comment |
add a comment |
A solution based on alignedat:
documentclass{article}
usepackage{blkarray}
usepackage{multirow}
usepackage{amsmath, amssymb}
usepackage{stackengine}
newcommand{xor}{mathrel{stackMathstackinset{l}{-1pt}{c}{0pt}{scriptscriptstylebullet}{ + }}}
begin{document}
begin{alignat}{2}
g^B(x )& = begin{cases}T \ F end{cases}
& &begin{aligned}
& text{if } x text{ is }mathsf{T}, \
& text{if } x text{ is }mathsf{F}.
end{aligned} \
g^ell (x) & = a xor
g^B(z) &qquad & text{if }x = ytriangleleft a triangleright z \
g^B(x )& = begin{cases}T \ F end{cases}
& &begin{aligned}
& text{if } x text{ is }mathsf{T}, \%
& text{if } x text{ is }mathsf{F}.
end{aligned}
end{alignat}
end{document}

add a comment |
A solution based on alignedat:
documentclass{article}
usepackage{blkarray}
usepackage{multirow}
usepackage{amsmath, amssymb}
usepackage{stackengine}
newcommand{xor}{mathrel{stackMathstackinset{l}{-1pt}{c}{0pt}{scriptscriptstylebullet}{ + }}}
begin{document}
begin{alignat}{2}
g^B(x )& = begin{cases}T \ F end{cases}
& &begin{aligned}
& text{if } x text{ is }mathsf{T}, \
& text{if } x text{ is }mathsf{F}.
end{aligned} \
g^ell (x) & = a xor
g^B(z) &qquad & text{if }x = ytriangleleft a triangleright z \
g^B(x )& = begin{cases}T \ F end{cases}
& &begin{aligned}
& text{if } x text{ is }mathsf{T}, \%
& text{if } x text{ is }mathsf{F}.
end{aligned}
end{alignat}
end{document}

add a comment |
A solution based on alignedat:
documentclass{article}
usepackage{blkarray}
usepackage{multirow}
usepackage{amsmath, amssymb}
usepackage{stackengine}
newcommand{xor}{mathrel{stackMathstackinset{l}{-1pt}{c}{0pt}{scriptscriptstylebullet}{ + }}}
begin{document}
begin{alignat}{2}
g^B(x )& = begin{cases}T \ F end{cases}
& &begin{aligned}
& text{if } x text{ is }mathsf{T}, \
& text{if } x text{ is }mathsf{F}.
end{aligned} \
g^ell (x) & = a xor
g^B(z) &qquad & text{if }x = ytriangleleft a triangleright z \
g^B(x )& = begin{cases}T \ F end{cases}
& &begin{aligned}
& text{if } x text{ is }mathsf{T}, \%
& text{if } x text{ is }mathsf{F}.
end{aligned}
end{alignat}
end{document}

A solution based on alignedat:
documentclass{article}
usepackage{blkarray}
usepackage{multirow}
usepackage{amsmath, amssymb}
usepackage{stackengine}
newcommand{xor}{mathrel{stackMathstackinset{l}{-1pt}{c}{0pt}{scriptscriptstylebullet}{ + }}}
begin{document}
begin{alignat}{2}
g^B(x )& = begin{cases}T \ F end{cases}
& &begin{aligned}
& text{if } x text{ is }mathsf{T}, \
& text{if } x text{ is }mathsf{F}.
end{aligned} \
g^ell (x) & = a xor
g^B(z) &qquad & text{if }x = ytriangleleft a triangleright z \
g^B(x )& = begin{cases}T \ F end{cases}
& &begin{aligned}
& text{if } x text{ is }mathsf{T}, \%
& text{if } x text{ is }mathsf{F}.
end{aligned}
end{alignat}
end{document}

answered 58 mins ago
BernardBernard
175k776207
175k776207
add a comment |
add a comment |
Sven is a new contributor. Be nice, and check out our Code of Conduct.
Sven is a new contributor. Be nice, and check out our Code of Conduct.
Sven is a new contributor. Be nice, and check out our Code of Conduct.
Sven is a new contributor. Be nice, and check out our Code of Conduct.
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%2f483234%2falign-text-in-a-cases-environment-with-text-outside%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