Spacing between elements in an array
I have the following table almost finished (I tried to make the code as much readable as I could)
documentclass{article}
usepackage[table]{xcolor}
usepackage{tikz}
usepackage{mathtools}
usepackage{array}
begin{document}
begin{center}
renewcommand{arraystretch}{1.6}
begin{equation*}
begin{array}{ | >{centeringarraybackslash$} p{4.0cm} <{$}
| >{centeringarraybackslash$} p{4.0cm} <{$}
| >{centeringarraybackslash$} p{4.0cm} <{$}
| } hline
a+infty=infty & a-infty=-infty & infty+infty=infty \ hline % End of 1st row
-infty-infty=-infty & inftycdotinfty=infty & -inftycdotinfty=-infty \ hline % End of 2nd row
dfrac{a}{infty}=0 &
dfrac{a}{0}=
left{ renewcommand{arraystretch}{1}
begin{tabular}{c}
$ infty $ si $ a>0 $\
$ -infty $ si $ a<0 $
end{tabular} right. &
infty^a=
left{ renewcommand{arraystretch}{1}
begin{tabular}{c}
$ infty $ si $ a>0 $\
$ 0 $ si $ a<0 $
end{tabular}right. \ hline % End of 3rd row
infty^infty=infty&infty^{-infty}=0&
a^infty=
left{ renewcommand{arraystretch}{1}
begin{tabular}{c}
$ infty $ si $ a>1 $\
$ 0 $ si $ 0leq a<1 $
end{tabular}right. \ hline % End of 4th row
cellcolor{gray!25}& 0^a=0text{ si $ a>0 $} &cellcolor{gray!25} \ hline % End of 5th row
end{array}
end{equation*}
end{center}
end{document}
Several problems here:
- I managed to make the columns to have the same width but I have to copy-paste that code every time I want to make a column with that property (maybe some redefinition with
renewcommand?) - When I use
tabularinside thearrayenvironment the curly brackets are too close from the cell limits, and I wonder if you can redefine the size of all the cells of those rows to fit those tables. - Is there an option that
array(ortabular) could get that stretch the array without having to userenewcommand{arraystretch}{<number>}every time I make a new table?
I'm looking for a general solution, not only for this problem, since I will define a lot of tables in my next report, and for sure a lot of people will appreciate a general solution since I see lots of questions about this mysterious world of LaTeX tables.
tables math-mode spacing arrays
add a comment |
I have the following table almost finished (I tried to make the code as much readable as I could)
documentclass{article}
usepackage[table]{xcolor}
usepackage{tikz}
usepackage{mathtools}
usepackage{array}
begin{document}
begin{center}
renewcommand{arraystretch}{1.6}
begin{equation*}
begin{array}{ | >{centeringarraybackslash$} p{4.0cm} <{$}
| >{centeringarraybackslash$} p{4.0cm} <{$}
| >{centeringarraybackslash$} p{4.0cm} <{$}
| } hline
a+infty=infty & a-infty=-infty & infty+infty=infty \ hline % End of 1st row
-infty-infty=-infty & inftycdotinfty=infty & -inftycdotinfty=-infty \ hline % End of 2nd row
dfrac{a}{infty}=0 &
dfrac{a}{0}=
left{ renewcommand{arraystretch}{1}
begin{tabular}{c}
$ infty $ si $ a>0 $\
$ -infty $ si $ a<0 $
end{tabular} right. &
infty^a=
left{ renewcommand{arraystretch}{1}
begin{tabular}{c}
$ infty $ si $ a>0 $\
$ 0 $ si $ a<0 $
end{tabular}right. \ hline % End of 3rd row
infty^infty=infty&infty^{-infty}=0&
a^infty=
left{ renewcommand{arraystretch}{1}
begin{tabular}{c}
$ infty $ si $ a>1 $\
$ 0 $ si $ 0leq a<1 $
end{tabular}right. \ hline % End of 4th row
cellcolor{gray!25}& 0^a=0text{ si $ a>0 $} &cellcolor{gray!25} \ hline % End of 5th row
end{array}
end{equation*}
end{center}
end{document}
Several problems here:
- I managed to make the columns to have the same width but I have to copy-paste that code every time I want to make a column with that property (maybe some redefinition with
renewcommand?) - When I use
tabularinside thearrayenvironment the curly brackets are too close from the cell limits, and I wonder if you can redefine the size of all the cells of those rows to fit those tables. - Is there an option that
array(ortabular) could get that stretch the array without having to userenewcommand{arraystretch}{<number>}every time I make a new table?
I'm looking for a general solution, not only for this problem, since I will define a lot of tables in my next report, and for sure a lot of people will appreciate a general solution since I see lots of questions about this mysterious world of LaTeX tables.
tables math-mode spacing arrays
add a comment |
I have the following table almost finished (I tried to make the code as much readable as I could)
documentclass{article}
usepackage[table]{xcolor}
usepackage{tikz}
usepackage{mathtools}
usepackage{array}
begin{document}
begin{center}
renewcommand{arraystretch}{1.6}
begin{equation*}
begin{array}{ | >{centeringarraybackslash$} p{4.0cm} <{$}
| >{centeringarraybackslash$} p{4.0cm} <{$}
| >{centeringarraybackslash$} p{4.0cm} <{$}
| } hline
a+infty=infty & a-infty=-infty & infty+infty=infty \ hline % End of 1st row
-infty-infty=-infty & inftycdotinfty=infty & -inftycdotinfty=-infty \ hline % End of 2nd row
dfrac{a}{infty}=0 &
dfrac{a}{0}=
left{ renewcommand{arraystretch}{1}
begin{tabular}{c}
$ infty $ si $ a>0 $\
$ -infty $ si $ a<0 $
end{tabular} right. &
infty^a=
left{ renewcommand{arraystretch}{1}
begin{tabular}{c}
$ infty $ si $ a>0 $\
$ 0 $ si $ a<0 $
end{tabular}right. \ hline % End of 3rd row
infty^infty=infty&infty^{-infty}=0&
a^infty=
left{ renewcommand{arraystretch}{1}
begin{tabular}{c}
$ infty $ si $ a>1 $\
$ 0 $ si $ 0leq a<1 $
end{tabular}right. \ hline % End of 4th row
cellcolor{gray!25}& 0^a=0text{ si $ a>0 $} &cellcolor{gray!25} \ hline % End of 5th row
end{array}
end{equation*}
end{center}
end{document}
Several problems here:
- I managed to make the columns to have the same width but I have to copy-paste that code every time I want to make a column with that property (maybe some redefinition with
renewcommand?) - When I use
tabularinside thearrayenvironment the curly brackets are too close from the cell limits, and I wonder if you can redefine the size of all the cells of those rows to fit those tables. - Is there an option that
array(ortabular) could get that stretch the array without having to userenewcommand{arraystretch}{<number>}every time I make a new table?
I'm looking for a general solution, not only for this problem, since I will define a lot of tables in my next report, and for sure a lot of people will appreciate a general solution since I see lots of questions about this mysterious world of LaTeX tables.
tables math-mode spacing arrays
I have the following table almost finished (I tried to make the code as much readable as I could)
documentclass{article}
usepackage[table]{xcolor}
usepackage{tikz}
usepackage{mathtools}
usepackage{array}
begin{document}
begin{center}
renewcommand{arraystretch}{1.6}
begin{equation*}
begin{array}{ | >{centeringarraybackslash$} p{4.0cm} <{$}
| >{centeringarraybackslash$} p{4.0cm} <{$}
| >{centeringarraybackslash$} p{4.0cm} <{$}
| } hline
a+infty=infty & a-infty=-infty & infty+infty=infty \ hline % End of 1st row
-infty-infty=-infty & inftycdotinfty=infty & -inftycdotinfty=-infty \ hline % End of 2nd row
dfrac{a}{infty}=0 &
dfrac{a}{0}=
left{ renewcommand{arraystretch}{1}
begin{tabular}{c}
$ infty $ si $ a>0 $\
$ -infty $ si $ a<0 $
end{tabular} right. &
infty^a=
left{ renewcommand{arraystretch}{1}
begin{tabular}{c}
$ infty $ si $ a>0 $\
$ 0 $ si $ a<0 $
end{tabular}right. \ hline % End of 3rd row
infty^infty=infty&infty^{-infty}=0&
a^infty=
left{ renewcommand{arraystretch}{1}
begin{tabular}{c}
$ infty $ si $ a>1 $\
$ 0 $ si $ 0leq a<1 $
end{tabular}right. \ hline % End of 4th row
cellcolor{gray!25}& 0^a=0text{ si $ a>0 $} &cellcolor{gray!25} \ hline % End of 5th row
end{array}
end{equation*}
end{center}
end{document}
Several problems here:
- I managed to make the columns to have the same width but I have to copy-paste that code every time I want to make a column with that property (maybe some redefinition with
renewcommand?) - When I use
tabularinside thearrayenvironment the curly brackets are too close from the cell limits, and I wonder if you can redefine the size of all the cells of those rows to fit those tables. - Is there an option that
array(ortabular) could get that stretch the array without having to userenewcommand{arraystretch}{<number>}every time I make a new table?
I'm looking for a general solution, not only for this problem, since I will define a lot of tables in my next report, and for sure a lot of people will appreciate a general solution since I see lots of questions about this mysterious world of LaTeX tables.
tables math-mode spacing arrays
tables math-mode spacing arrays
asked 21 mins ago
MartínMartín
665
665
add a comment |
add a comment |
0
active
oldest
votes
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%2f472666%2fspacing-between-elements-in-an-array%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f472666%2fspacing-between-elements-in-an-array%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