Table: make one row and one column in bold and add a axis name as shown in the pictureFormat whole row of...
Why didn't Eru and/or the Valar intervene when Sauron corrupted Númenor?
How should I state my MS degree in my CV when it was in practice a joint-program?
Walking in a rotating spacecraft and Newton's 3rd Law of Motion
It took me a lot of time to make this, pls like. (YouTube Comments #1)
How to add multiple differently colored borders around a node?
A Wacky, Wacky Chessboard (That Makes No Sense)
Why do neural networks need so many training examples to perform?
Why does the DC-9-80 have this cusp in its fuselage?
What is the purpose of easy combat scenarios that don't need resource expenditure?
Using AWS Fargate as web server
Is my plan for fixing my water heater leak bad?
Yeshiva University RIETS Semicha Yorei and Yadin
Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?
Why is commutativity optional in multiplication for rings?
Crystal compensation for temp and voltage
Finding an integral using a table?
Why zero tolerance on nudity in space?
ip vs ifconfig commands pros and cons
Finding ratio of the area of triangles
Could quantum mechanics be necessary to analyze some biology scenarios?
Where is this triangular-shaped space station from?
What is the wife of a henpecked husband called?
Is Draco canonically good-looking?
For Loop and Sum
Table: make one row and one column in bold and add a axis name as shown in the picture
Format whole row of table as boldCan I make an arrow of length x in latex?Paragraph column in tabular working only in the first columnHow do I prevent cellcolor from over effect of hlineAdd header to the tableHow does this TeX code generate automatic hline's in tabular environments?Specified Column Width, Centered Positioned Colum with Doouble Line (with bold line) in first rowHow to place the text top left in a table cellIncrease the height of the row in the tableAligning top row of a table with the item label in a listSend tabular data to LatexComparative table with vertical text in first row and column
I would like to create my table as shown in the picture.
I have attached the LaTeX code I have written. How to modify it, to get the same as that in the picture?
begin{table}[h]
begin{center}
setlength{tabcolsep}{0.4cm}
renewcommand{arraystretch}{1}
begin{tabular}{|c|ccccccccccc|}hline
&-50& -40 &-30&-20&-10&0&10&20&30&40&50 \ hline
50 &0& 0 &0&0&0&0&0&0&0&0&0 \
40 & 0 & 0 & 0& 0&0 & 0 & 0 & 0 & 0 &0 &0 \
30 & 0 & 0 & 0& 10 & 13 & 18 & 14 & 7 & 0 &0 &0\
20 & 0& 0& 14& 19 & 22 & 24 &22& 18& 12& 0 &0\
10& 0& 8& 20& 24& 27& 27& 24& 21& 12&0&0\
0& 3 & 12& 22 &25& 27& 30& 27& 24& 18 &4&0\
-10& 6& 16 &24& 27 &27& 30& 27& 24& 17& 8 &0\
-20 &0& 10& 18& 22& 27& 27& 23& 21& 12&0 &0\
-30& 0& 4& 14& 18& 22& 24& 18& 15& 13&0&0\
-40 &0& 0& 0& 0& 0& 0& 0& 0& 0 &0&0\
-50 &0& 0 &0&0&0&0&0&0&0&0&0 \ hline
end{tabular}
end{center}
end{table}
tables
add a comment |
I would like to create my table as shown in the picture.
I have attached the LaTeX code I have written. How to modify it, to get the same as that in the picture?
begin{table}[h]
begin{center}
setlength{tabcolsep}{0.4cm}
renewcommand{arraystretch}{1}
begin{tabular}{|c|ccccccccccc|}hline
&-50& -40 &-30&-20&-10&0&10&20&30&40&50 \ hline
50 &0& 0 &0&0&0&0&0&0&0&0&0 \
40 & 0 & 0 & 0& 0&0 & 0 & 0 & 0 & 0 &0 &0 \
30 & 0 & 0 & 0& 10 & 13 & 18 & 14 & 7 & 0 &0 &0\
20 & 0& 0& 14& 19 & 22 & 24 &22& 18& 12& 0 &0\
10& 0& 8& 20& 24& 27& 27& 24& 21& 12&0&0\
0& 3 & 12& 22 &25& 27& 30& 27& 24& 18 &4&0\
-10& 6& 16 &24& 27 &27& 30& 27& 24& 17& 8 &0\
-20 &0& 10& 18& 22& 27& 27& 23& 21& 12&0 &0\
-30& 0& 4& 14& 18& 22& 24& 18& 15& 13&0&0\
-40 &0& 0& 0& 0& 0& 0& 0& 0& 0 &0&0\
-50 &0& 0 &0&0&0&0&0&0&0&0&0 \ hline
end{tabular}
end{center}
end{table}
tables
add a comment |
I would like to create my table as shown in the picture.
I have attached the LaTeX code I have written. How to modify it, to get the same as that in the picture?
begin{table}[h]
begin{center}
setlength{tabcolsep}{0.4cm}
renewcommand{arraystretch}{1}
begin{tabular}{|c|ccccccccccc|}hline
&-50& -40 &-30&-20&-10&0&10&20&30&40&50 \ hline
50 &0& 0 &0&0&0&0&0&0&0&0&0 \
40 & 0 & 0 & 0& 0&0 & 0 & 0 & 0 & 0 &0 &0 \
30 & 0 & 0 & 0& 10 & 13 & 18 & 14 & 7 & 0 &0 &0\
20 & 0& 0& 14& 19 & 22 & 24 &22& 18& 12& 0 &0\
10& 0& 8& 20& 24& 27& 27& 24& 21& 12&0&0\
0& 3 & 12& 22 &25& 27& 30& 27& 24& 18 &4&0\
-10& 6& 16 &24& 27 &27& 30& 27& 24& 17& 8 &0\
-20 &0& 10& 18& 22& 27& 27& 23& 21& 12&0 &0\
-30& 0& 4& 14& 18& 22& 24& 18& 15& 13&0&0\
-40 &0& 0& 0& 0& 0& 0& 0& 0& 0 &0&0\
-50 &0& 0 &0&0&0&0&0&0&0&0&0 \ hline
end{tabular}
end{center}
end{table}
tables
I would like to create my table as shown in the picture.
I have attached the LaTeX code I have written. How to modify it, to get the same as that in the picture?
begin{table}[h]
begin{center}
setlength{tabcolsep}{0.4cm}
renewcommand{arraystretch}{1}
begin{tabular}{|c|ccccccccccc|}hline
&-50& -40 &-30&-20&-10&0&10&20&30&40&50 \ hline
50 &0& 0 &0&0&0&0&0&0&0&0&0 \
40 & 0 & 0 & 0& 0&0 & 0 & 0 & 0 & 0 &0 &0 \
30 & 0 & 0 & 0& 10 & 13 & 18 & 14 & 7 & 0 &0 &0\
20 & 0& 0& 14& 19 & 22 & 24 &22& 18& 12& 0 &0\
10& 0& 8& 20& 24& 27& 27& 24& 21& 12&0&0\
0& 3 & 12& 22 &25& 27& 30& 27& 24& 18 &4&0\
-10& 6& 16 &24& 27 &27& 30& 27& 24& 17& 8 &0\
-20 &0& 10& 18& 22& 27& 27& 23& 21& 12&0 &0\
-30& 0& 4& 14& 18& 22& 24& 18& 15& 13&0&0\
-40 &0& 0& 0& 0& 0& 0& 0& 0& 0 &0&0\
-50 &0& 0 &0&0&0&0&0&0&0&0&0 \ hline
end{tabular}
end{center}
end{table}
tables
tables
edited Feb 2 at 14:25
CarLaTeX
32.4k551134
32.4k551134
asked Feb 2 at 14:05
Parnal PatniParnal Patni
83
83
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
With some multicolumn
and multirow
commands as well as using arrows of specific size from here, you can achieve the desired result. For the bold column, I hvave used >{bfseries}c
instead of c
and for the bold row, I have repeatedly sed textbf{}
. For a more automated version of bold rows in tables, see for example here . Lastly, please note that I have also replaced the center
environment by the centering
command as the former adds unwanted vertical white space arount the tabular.
documentclass{article}
usepackage{geometry}
usepackage{array}
usepackage{multirow}
usepackage{mathtools}
begin{document}
begin{table}[h]
centering
setlength{tabcolsep}{0.4cm}
renewcommand{arraystretch}{1}
begin{tabular}{c|>{bfseries}c|ccccccccccc|}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{5}{c}{$xleftarrow{makebox[5.25cm]{}}$} & x & multicolumn{5}{c}{$xrightarrow{makebox[4.75cm]{}}$}\ cline{2-13}
& & textbf{-50} & textbf{-40} & textbf{-30} & textbf{-20} & textbf{-10} & textbf{0} & textbf{10} & textbf{20} & textbf{30} & textbf{40} & textbf{50} \ cline{2-13}
multirow{5}{*}{rotatebox{90}{$xrightarrow{makebox[1.25cm]{}}$}} & 50 &0& 0 &0&0&0&0&0&0&0&0&0 \
& 40 & 0 & 0 & 0& 0&0 & 0 & 0 & 0 & 0 &0 &0 \
& 30 & 0 & 0 & 0& 10 & 13 & 18 & 14 & 7 & 0 &0 &0\
& 20 & 0& 0& 14& 19 & 22 & 24 &22& 18& 12& 0 &0\
& 10& 0& 8& 20& 24& 27& 27& 24& 21& 12&0&0\
y & 0& 3 & 12& 22 &25& 27& 30& 27& 24& 18 &4&0\
multirow{5}{*}{rotatebox{-90}{$xrightarrow{makebox[1.25cm]{}}$}} & -10& 6& 16 &24& 27 &27& 30& 27& 24& 17& 8 &0\
& -20 &0& 10& 18& 22& 27& 27& 23& 21& 12&0 &0\
& -30& 0& 4& 14& 18& 22& 24& 18& 15& 13&0&0\
& -40 &0& 0& 0& 0& 0& 0& 0& 0& 0 &0&0\
& -50 &0& 0 &0&0&0&0&0&0&0&0&0 \ cline{2-13}
end{tabular}
end{table}
end{document}
Regarding the request in the comments:
documentclass{article}
usepackage{geometry}
usepackage{array}
usepackage{multirow}
usepackage{mathtools}
begin{document}
begin{table}[h]
centering
setlength{tabcolsep}{0.4cm}
renewcommand{arraystretch}{1}
begin{tabular}{c|>{bfseries}c|ccccccccccc|}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{5}{r}{multirow{2}{*}{$xleftarrow{makebox[5.25cm]{}}$}} & x & multicolumn{5}{l}{multirow{2}{*}{$xrightarrow{makebox[4.75cm]{}}$}}\
multicolumn{1}{c}{} & multicolumn{1}{c}{} & & & & & multicolumn{3}{c}{in mm}\ cline{2-13}
& & textbf{-50} & textbf{-40} & textbf{-30} & textbf{-20} & textbf{-10} & textbf{0} & textbf{10} & textbf{20} & textbf{30} & textbf{40} & textbf{50} \ cline{2-13}
multirow{4}{*}{rotatebox{90}{$xrightarrow{makebox[1.25cm]{}}$}} & 50 &0& 0 &0&0&0&0&0&0&0&0&0 \
& 40 & 0 & 0 & 0& 0&0 & 0 & 0 & 0 & 0 &0 &0 \
& 30 & 0 & 0 & 0& 10 & 13 & 18 & 14 & 7 & 0 &0 &0\
& 20 & 0& 0& 14& 19 & 22 & 24 &22& 18& 12& 0 &0\
y & 10& 0& 8& 20& 24& 27& 27& 24& 21& 12&0&0\
in mm & 0& 3 & 12& 22 &25& 27& 30& 27& 24& 18 &4&0\
multirow{5}{*}{rotatebox{-90}{$xrightarrow{makebox[1.5cm]{}}$}} & -10& 6& 16 &24& 27 &27& 30& 27& 24& 17& 8 &0\
& -20 &0& 10& 18& 22& 27& 27& 23& 21& 12&0 &0\
& -30& 0& 4& 14& 18& 22& 24& 18& 15& 13&0&0\
& -40 &0& 0& 0& 0& 0& 0& 0& 0& 0 &0&0\
& -50 &0& 0 &0&0&0&0&0&0&0&0&0 \ cline{2-13}
end{tabular}
end{table}
end{document}
Hello, I try to write X in mm and the distance between the 0th column increases. If i had to write "in mm" i=on the next line. How to do it
– Parnal Patni
13 hours ago
Like one of these? i.stack.imgur.com/yJGbI.png
– leandriis
13 hours ago
Yes for both, X and Y
– Parnal Patni
12 hours ago
Please see my updated answer for a suggestion on how to addin mm
to bothx
andy
.
– leandriis
12 hours ago
multicolumn{1}{c}{} & multicolumn{1}{c}{} & & & & & multicolumn{3}{c}{in mm}\ cline{2-13} I get an error for this line
– Parnal Patni
9 hours ago
|
show 3 more comments
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%2f473034%2ftable-make-one-row-and-one-column-in-bold-and-add-a-axis-name-as-shown-in-the-p%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
With some multicolumn
and multirow
commands as well as using arrows of specific size from here, you can achieve the desired result. For the bold column, I hvave used >{bfseries}c
instead of c
and for the bold row, I have repeatedly sed textbf{}
. For a more automated version of bold rows in tables, see for example here . Lastly, please note that I have also replaced the center
environment by the centering
command as the former adds unwanted vertical white space arount the tabular.
documentclass{article}
usepackage{geometry}
usepackage{array}
usepackage{multirow}
usepackage{mathtools}
begin{document}
begin{table}[h]
centering
setlength{tabcolsep}{0.4cm}
renewcommand{arraystretch}{1}
begin{tabular}{c|>{bfseries}c|ccccccccccc|}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{5}{c}{$xleftarrow{makebox[5.25cm]{}}$} & x & multicolumn{5}{c}{$xrightarrow{makebox[4.75cm]{}}$}\ cline{2-13}
& & textbf{-50} & textbf{-40} & textbf{-30} & textbf{-20} & textbf{-10} & textbf{0} & textbf{10} & textbf{20} & textbf{30} & textbf{40} & textbf{50} \ cline{2-13}
multirow{5}{*}{rotatebox{90}{$xrightarrow{makebox[1.25cm]{}}$}} & 50 &0& 0 &0&0&0&0&0&0&0&0&0 \
& 40 & 0 & 0 & 0& 0&0 & 0 & 0 & 0 & 0 &0 &0 \
& 30 & 0 & 0 & 0& 10 & 13 & 18 & 14 & 7 & 0 &0 &0\
& 20 & 0& 0& 14& 19 & 22 & 24 &22& 18& 12& 0 &0\
& 10& 0& 8& 20& 24& 27& 27& 24& 21& 12&0&0\
y & 0& 3 & 12& 22 &25& 27& 30& 27& 24& 18 &4&0\
multirow{5}{*}{rotatebox{-90}{$xrightarrow{makebox[1.25cm]{}}$}} & -10& 6& 16 &24& 27 &27& 30& 27& 24& 17& 8 &0\
& -20 &0& 10& 18& 22& 27& 27& 23& 21& 12&0 &0\
& -30& 0& 4& 14& 18& 22& 24& 18& 15& 13&0&0\
& -40 &0& 0& 0& 0& 0& 0& 0& 0& 0 &0&0\
& -50 &0& 0 &0&0&0&0&0&0&0&0&0 \ cline{2-13}
end{tabular}
end{table}
end{document}
Regarding the request in the comments:
documentclass{article}
usepackage{geometry}
usepackage{array}
usepackage{multirow}
usepackage{mathtools}
begin{document}
begin{table}[h]
centering
setlength{tabcolsep}{0.4cm}
renewcommand{arraystretch}{1}
begin{tabular}{c|>{bfseries}c|ccccccccccc|}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{5}{r}{multirow{2}{*}{$xleftarrow{makebox[5.25cm]{}}$}} & x & multicolumn{5}{l}{multirow{2}{*}{$xrightarrow{makebox[4.75cm]{}}$}}\
multicolumn{1}{c}{} & multicolumn{1}{c}{} & & & & & multicolumn{3}{c}{in mm}\ cline{2-13}
& & textbf{-50} & textbf{-40} & textbf{-30} & textbf{-20} & textbf{-10} & textbf{0} & textbf{10} & textbf{20} & textbf{30} & textbf{40} & textbf{50} \ cline{2-13}
multirow{4}{*}{rotatebox{90}{$xrightarrow{makebox[1.25cm]{}}$}} & 50 &0& 0 &0&0&0&0&0&0&0&0&0 \
& 40 & 0 & 0 & 0& 0&0 & 0 & 0 & 0 & 0 &0 &0 \
& 30 & 0 & 0 & 0& 10 & 13 & 18 & 14 & 7 & 0 &0 &0\
& 20 & 0& 0& 14& 19 & 22 & 24 &22& 18& 12& 0 &0\
y & 10& 0& 8& 20& 24& 27& 27& 24& 21& 12&0&0\
in mm & 0& 3 & 12& 22 &25& 27& 30& 27& 24& 18 &4&0\
multirow{5}{*}{rotatebox{-90}{$xrightarrow{makebox[1.5cm]{}}$}} & -10& 6& 16 &24& 27 &27& 30& 27& 24& 17& 8 &0\
& -20 &0& 10& 18& 22& 27& 27& 23& 21& 12&0 &0\
& -30& 0& 4& 14& 18& 22& 24& 18& 15& 13&0&0\
& -40 &0& 0& 0& 0& 0& 0& 0& 0& 0 &0&0\
& -50 &0& 0 &0&0&0&0&0&0&0&0&0 \ cline{2-13}
end{tabular}
end{table}
end{document}
Hello, I try to write X in mm and the distance between the 0th column increases. If i had to write "in mm" i=on the next line. How to do it
– Parnal Patni
13 hours ago
Like one of these? i.stack.imgur.com/yJGbI.png
– leandriis
13 hours ago
Yes for both, X and Y
– Parnal Patni
12 hours ago
Please see my updated answer for a suggestion on how to addin mm
to bothx
andy
.
– leandriis
12 hours ago
multicolumn{1}{c}{} & multicolumn{1}{c}{} & & & & & multicolumn{3}{c}{in mm}\ cline{2-13} I get an error for this line
– Parnal Patni
9 hours ago
|
show 3 more comments
With some multicolumn
and multirow
commands as well as using arrows of specific size from here, you can achieve the desired result. For the bold column, I hvave used >{bfseries}c
instead of c
and for the bold row, I have repeatedly sed textbf{}
. For a more automated version of bold rows in tables, see for example here . Lastly, please note that I have also replaced the center
environment by the centering
command as the former adds unwanted vertical white space arount the tabular.
documentclass{article}
usepackage{geometry}
usepackage{array}
usepackage{multirow}
usepackage{mathtools}
begin{document}
begin{table}[h]
centering
setlength{tabcolsep}{0.4cm}
renewcommand{arraystretch}{1}
begin{tabular}{c|>{bfseries}c|ccccccccccc|}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{5}{c}{$xleftarrow{makebox[5.25cm]{}}$} & x & multicolumn{5}{c}{$xrightarrow{makebox[4.75cm]{}}$}\ cline{2-13}
& & textbf{-50} & textbf{-40} & textbf{-30} & textbf{-20} & textbf{-10} & textbf{0} & textbf{10} & textbf{20} & textbf{30} & textbf{40} & textbf{50} \ cline{2-13}
multirow{5}{*}{rotatebox{90}{$xrightarrow{makebox[1.25cm]{}}$}} & 50 &0& 0 &0&0&0&0&0&0&0&0&0 \
& 40 & 0 & 0 & 0& 0&0 & 0 & 0 & 0 & 0 &0 &0 \
& 30 & 0 & 0 & 0& 10 & 13 & 18 & 14 & 7 & 0 &0 &0\
& 20 & 0& 0& 14& 19 & 22 & 24 &22& 18& 12& 0 &0\
& 10& 0& 8& 20& 24& 27& 27& 24& 21& 12&0&0\
y & 0& 3 & 12& 22 &25& 27& 30& 27& 24& 18 &4&0\
multirow{5}{*}{rotatebox{-90}{$xrightarrow{makebox[1.25cm]{}}$}} & -10& 6& 16 &24& 27 &27& 30& 27& 24& 17& 8 &0\
& -20 &0& 10& 18& 22& 27& 27& 23& 21& 12&0 &0\
& -30& 0& 4& 14& 18& 22& 24& 18& 15& 13&0&0\
& -40 &0& 0& 0& 0& 0& 0& 0& 0& 0 &0&0\
& -50 &0& 0 &0&0&0&0&0&0&0&0&0 \ cline{2-13}
end{tabular}
end{table}
end{document}
Regarding the request in the comments:
documentclass{article}
usepackage{geometry}
usepackage{array}
usepackage{multirow}
usepackage{mathtools}
begin{document}
begin{table}[h]
centering
setlength{tabcolsep}{0.4cm}
renewcommand{arraystretch}{1}
begin{tabular}{c|>{bfseries}c|ccccccccccc|}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{5}{r}{multirow{2}{*}{$xleftarrow{makebox[5.25cm]{}}$}} & x & multicolumn{5}{l}{multirow{2}{*}{$xrightarrow{makebox[4.75cm]{}}$}}\
multicolumn{1}{c}{} & multicolumn{1}{c}{} & & & & & multicolumn{3}{c}{in mm}\ cline{2-13}
& & textbf{-50} & textbf{-40} & textbf{-30} & textbf{-20} & textbf{-10} & textbf{0} & textbf{10} & textbf{20} & textbf{30} & textbf{40} & textbf{50} \ cline{2-13}
multirow{4}{*}{rotatebox{90}{$xrightarrow{makebox[1.25cm]{}}$}} & 50 &0& 0 &0&0&0&0&0&0&0&0&0 \
& 40 & 0 & 0 & 0& 0&0 & 0 & 0 & 0 & 0 &0 &0 \
& 30 & 0 & 0 & 0& 10 & 13 & 18 & 14 & 7 & 0 &0 &0\
& 20 & 0& 0& 14& 19 & 22 & 24 &22& 18& 12& 0 &0\
y & 10& 0& 8& 20& 24& 27& 27& 24& 21& 12&0&0\
in mm & 0& 3 & 12& 22 &25& 27& 30& 27& 24& 18 &4&0\
multirow{5}{*}{rotatebox{-90}{$xrightarrow{makebox[1.5cm]{}}$}} & -10& 6& 16 &24& 27 &27& 30& 27& 24& 17& 8 &0\
& -20 &0& 10& 18& 22& 27& 27& 23& 21& 12&0 &0\
& -30& 0& 4& 14& 18& 22& 24& 18& 15& 13&0&0\
& -40 &0& 0& 0& 0& 0& 0& 0& 0& 0 &0&0\
& -50 &0& 0 &0&0&0&0&0&0&0&0&0 \ cline{2-13}
end{tabular}
end{table}
end{document}
Hello, I try to write X in mm and the distance between the 0th column increases. If i had to write "in mm" i=on the next line. How to do it
– Parnal Patni
13 hours ago
Like one of these? i.stack.imgur.com/yJGbI.png
– leandriis
13 hours ago
Yes for both, X and Y
– Parnal Patni
12 hours ago
Please see my updated answer for a suggestion on how to addin mm
to bothx
andy
.
– leandriis
12 hours ago
multicolumn{1}{c}{} & multicolumn{1}{c}{} & & & & & multicolumn{3}{c}{in mm}\ cline{2-13} I get an error for this line
– Parnal Patni
9 hours ago
|
show 3 more comments
With some multicolumn
and multirow
commands as well as using arrows of specific size from here, you can achieve the desired result. For the bold column, I hvave used >{bfseries}c
instead of c
and for the bold row, I have repeatedly sed textbf{}
. For a more automated version of bold rows in tables, see for example here . Lastly, please note that I have also replaced the center
environment by the centering
command as the former adds unwanted vertical white space arount the tabular.
documentclass{article}
usepackage{geometry}
usepackage{array}
usepackage{multirow}
usepackage{mathtools}
begin{document}
begin{table}[h]
centering
setlength{tabcolsep}{0.4cm}
renewcommand{arraystretch}{1}
begin{tabular}{c|>{bfseries}c|ccccccccccc|}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{5}{c}{$xleftarrow{makebox[5.25cm]{}}$} & x & multicolumn{5}{c}{$xrightarrow{makebox[4.75cm]{}}$}\ cline{2-13}
& & textbf{-50} & textbf{-40} & textbf{-30} & textbf{-20} & textbf{-10} & textbf{0} & textbf{10} & textbf{20} & textbf{30} & textbf{40} & textbf{50} \ cline{2-13}
multirow{5}{*}{rotatebox{90}{$xrightarrow{makebox[1.25cm]{}}$}} & 50 &0& 0 &0&0&0&0&0&0&0&0&0 \
& 40 & 0 & 0 & 0& 0&0 & 0 & 0 & 0 & 0 &0 &0 \
& 30 & 0 & 0 & 0& 10 & 13 & 18 & 14 & 7 & 0 &0 &0\
& 20 & 0& 0& 14& 19 & 22 & 24 &22& 18& 12& 0 &0\
& 10& 0& 8& 20& 24& 27& 27& 24& 21& 12&0&0\
y & 0& 3 & 12& 22 &25& 27& 30& 27& 24& 18 &4&0\
multirow{5}{*}{rotatebox{-90}{$xrightarrow{makebox[1.25cm]{}}$}} & -10& 6& 16 &24& 27 &27& 30& 27& 24& 17& 8 &0\
& -20 &0& 10& 18& 22& 27& 27& 23& 21& 12&0 &0\
& -30& 0& 4& 14& 18& 22& 24& 18& 15& 13&0&0\
& -40 &0& 0& 0& 0& 0& 0& 0& 0& 0 &0&0\
& -50 &0& 0 &0&0&0&0&0&0&0&0&0 \ cline{2-13}
end{tabular}
end{table}
end{document}
Regarding the request in the comments:
documentclass{article}
usepackage{geometry}
usepackage{array}
usepackage{multirow}
usepackage{mathtools}
begin{document}
begin{table}[h]
centering
setlength{tabcolsep}{0.4cm}
renewcommand{arraystretch}{1}
begin{tabular}{c|>{bfseries}c|ccccccccccc|}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{5}{r}{multirow{2}{*}{$xleftarrow{makebox[5.25cm]{}}$}} & x & multicolumn{5}{l}{multirow{2}{*}{$xrightarrow{makebox[4.75cm]{}}$}}\
multicolumn{1}{c}{} & multicolumn{1}{c}{} & & & & & multicolumn{3}{c}{in mm}\ cline{2-13}
& & textbf{-50} & textbf{-40} & textbf{-30} & textbf{-20} & textbf{-10} & textbf{0} & textbf{10} & textbf{20} & textbf{30} & textbf{40} & textbf{50} \ cline{2-13}
multirow{4}{*}{rotatebox{90}{$xrightarrow{makebox[1.25cm]{}}$}} & 50 &0& 0 &0&0&0&0&0&0&0&0&0 \
& 40 & 0 & 0 & 0& 0&0 & 0 & 0 & 0 & 0 &0 &0 \
& 30 & 0 & 0 & 0& 10 & 13 & 18 & 14 & 7 & 0 &0 &0\
& 20 & 0& 0& 14& 19 & 22 & 24 &22& 18& 12& 0 &0\
y & 10& 0& 8& 20& 24& 27& 27& 24& 21& 12&0&0\
in mm & 0& 3 & 12& 22 &25& 27& 30& 27& 24& 18 &4&0\
multirow{5}{*}{rotatebox{-90}{$xrightarrow{makebox[1.5cm]{}}$}} & -10& 6& 16 &24& 27 &27& 30& 27& 24& 17& 8 &0\
& -20 &0& 10& 18& 22& 27& 27& 23& 21& 12&0 &0\
& -30& 0& 4& 14& 18& 22& 24& 18& 15& 13&0&0\
& -40 &0& 0& 0& 0& 0& 0& 0& 0& 0 &0&0\
& -50 &0& 0 &0&0&0&0&0&0&0&0&0 \ cline{2-13}
end{tabular}
end{table}
end{document}
With some multicolumn
and multirow
commands as well as using arrows of specific size from here, you can achieve the desired result. For the bold column, I hvave used >{bfseries}c
instead of c
and for the bold row, I have repeatedly sed textbf{}
. For a more automated version of bold rows in tables, see for example here . Lastly, please note that I have also replaced the center
environment by the centering
command as the former adds unwanted vertical white space arount the tabular.
documentclass{article}
usepackage{geometry}
usepackage{array}
usepackage{multirow}
usepackage{mathtools}
begin{document}
begin{table}[h]
centering
setlength{tabcolsep}{0.4cm}
renewcommand{arraystretch}{1}
begin{tabular}{c|>{bfseries}c|ccccccccccc|}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{5}{c}{$xleftarrow{makebox[5.25cm]{}}$} & x & multicolumn{5}{c}{$xrightarrow{makebox[4.75cm]{}}$}\ cline{2-13}
& & textbf{-50} & textbf{-40} & textbf{-30} & textbf{-20} & textbf{-10} & textbf{0} & textbf{10} & textbf{20} & textbf{30} & textbf{40} & textbf{50} \ cline{2-13}
multirow{5}{*}{rotatebox{90}{$xrightarrow{makebox[1.25cm]{}}$}} & 50 &0& 0 &0&0&0&0&0&0&0&0&0 \
& 40 & 0 & 0 & 0& 0&0 & 0 & 0 & 0 & 0 &0 &0 \
& 30 & 0 & 0 & 0& 10 & 13 & 18 & 14 & 7 & 0 &0 &0\
& 20 & 0& 0& 14& 19 & 22 & 24 &22& 18& 12& 0 &0\
& 10& 0& 8& 20& 24& 27& 27& 24& 21& 12&0&0\
y & 0& 3 & 12& 22 &25& 27& 30& 27& 24& 18 &4&0\
multirow{5}{*}{rotatebox{-90}{$xrightarrow{makebox[1.25cm]{}}$}} & -10& 6& 16 &24& 27 &27& 30& 27& 24& 17& 8 &0\
& -20 &0& 10& 18& 22& 27& 27& 23& 21& 12&0 &0\
& -30& 0& 4& 14& 18& 22& 24& 18& 15& 13&0&0\
& -40 &0& 0& 0& 0& 0& 0& 0& 0& 0 &0&0\
& -50 &0& 0 &0&0&0&0&0&0&0&0&0 \ cline{2-13}
end{tabular}
end{table}
end{document}
Regarding the request in the comments:
documentclass{article}
usepackage{geometry}
usepackage{array}
usepackage{multirow}
usepackage{mathtools}
begin{document}
begin{table}[h]
centering
setlength{tabcolsep}{0.4cm}
renewcommand{arraystretch}{1}
begin{tabular}{c|>{bfseries}c|ccccccccccc|}
multicolumn{1}{c}{} & multicolumn{1}{c}{} & multicolumn{5}{r}{multirow{2}{*}{$xleftarrow{makebox[5.25cm]{}}$}} & x & multicolumn{5}{l}{multirow{2}{*}{$xrightarrow{makebox[4.75cm]{}}$}}\
multicolumn{1}{c}{} & multicolumn{1}{c}{} & & & & & multicolumn{3}{c}{in mm}\ cline{2-13}
& & textbf{-50} & textbf{-40} & textbf{-30} & textbf{-20} & textbf{-10} & textbf{0} & textbf{10} & textbf{20} & textbf{30} & textbf{40} & textbf{50} \ cline{2-13}
multirow{4}{*}{rotatebox{90}{$xrightarrow{makebox[1.25cm]{}}$}} & 50 &0& 0 &0&0&0&0&0&0&0&0&0 \
& 40 & 0 & 0 & 0& 0&0 & 0 & 0 & 0 & 0 &0 &0 \
& 30 & 0 & 0 & 0& 10 & 13 & 18 & 14 & 7 & 0 &0 &0\
& 20 & 0& 0& 14& 19 & 22 & 24 &22& 18& 12& 0 &0\
y & 10& 0& 8& 20& 24& 27& 27& 24& 21& 12&0&0\
in mm & 0& 3 & 12& 22 &25& 27& 30& 27& 24& 18 &4&0\
multirow{5}{*}{rotatebox{-90}{$xrightarrow{makebox[1.5cm]{}}$}} & -10& 6& 16 &24& 27 &27& 30& 27& 24& 17& 8 &0\
& -20 &0& 10& 18& 22& 27& 27& 23& 21& 12&0 &0\
& -30& 0& 4& 14& 18& 22& 24& 18& 15& 13&0&0\
& -40 &0& 0& 0& 0& 0& 0& 0& 0& 0 &0&0\
& -50 &0& 0 &0&0&0&0&0&0&0&0&0 \ cline{2-13}
end{tabular}
end{table}
end{document}
edited 12 hours ago
answered Feb 2 at 15:49
leandriisleandriis
9,3501530
9,3501530
Hello, I try to write X in mm and the distance between the 0th column increases. If i had to write "in mm" i=on the next line. How to do it
– Parnal Patni
13 hours ago
Like one of these? i.stack.imgur.com/yJGbI.png
– leandriis
13 hours ago
Yes for both, X and Y
– Parnal Patni
12 hours ago
Please see my updated answer for a suggestion on how to addin mm
to bothx
andy
.
– leandriis
12 hours ago
multicolumn{1}{c}{} & multicolumn{1}{c}{} & & & & & multicolumn{3}{c}{in mm}\ cline{2-13} I get an error for this line
– Parnal Patni
9 hours ago
|
show 3 more comments
Hello, I try to write X in mm and the distance between the 0th column increases. If i had to write "in mm" i=on the next line. How to do it
– Parnal Patni
13 hours ago
Like one of these? i.stack.imgur.com/yJGbI.png
– leandriis
13 hours ago
Yes for both, X and Y
– Parnal Patni
12 hours ago
Please see my updated answer for a suggestion on how to addin mm
to bothx
andy
.
– leandriis
12 hours ago
multicolumn{1}{c}{} & multicolumn{1}{c}{} & & & & & multicolumn{3}{c}{in mm}\ cline{2-13} I get an error for this line
– Parnal Patni
9 hours ago
Hello, I try to write X in mm and the distance between the 0th column increases. If i had to write "in mm" i=on the next line. How to do it
– Parnal Patni
13 hours ago
Hello, I try to write X in mm and the distance between the 0th column increases. If i had to write "in mm" i=on the next line. How to do it
– Parnal Patni
13 hours ago
Like one of these? i.stack.imgur.com/yJGbI.png
– leandriis
13 hours ago
Like one of these? i.stack.imgur.com/yJGbI.png
– leandriis
13 hours ago
Yes for both, X and Y
– Parnal Patni
12 hours ago
Yes for both, X and Y
– Parnal Patni
12 hours ago
Please see my updated answer for a suggestion on how to add
in mm
to both x
and y
.– leandriis
12 hours ago
Please see my updated answer for a suggestion on how to add
in mm
to both x
and y
.– leandriis
12 hours ago
multicolumn{1}{c}{} & multicolumn{1}{c}{} & & & & & multicolumn{3}{c}{in mm}\ cline{2-13} I get an error for this line
– Parnal Patni
9 hours ago
multicolumn{1}{c}{} & multicolumn{1}{c}{} & & & & & multicolumn{3}{c}{in mm}\ cline{2-13} I get an error for this line
– Parnal Patni
9 hours ago
|
show 3 more comments
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%2f473034%2ftable-make-one-row-and-one-column-in-bold-and-add-a-axis-name-as-shown-in-the-p%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