How to use multirow
I can compile this table separately but when I want to compile the whole file, it gives me an error, which is fixed by removing multirow
.
usepackage{multirow}
begin{table}[htbp]
begin{center}
begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
hline
A & B & C & D & multicolumn{7}{|c|}{F} \ hline
multirow{ 2}{}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
& 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
end{tabular}
end{center}
label{table2}
end{table}
tables multirow
add a comment |
I can compile this table separately but when I want to compile the whole file, it gives me an error, which is fixed by removing multirow
.
usepackage{multirow}
begin{table}[htbp]
begin{center}
begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
hline
A & B & C & D & multicolumn{7}{|c|}{F} \ hline
multirow{ 2}{}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
& 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
end{tabular}
end{center}
label{table2}
end{table}
tables multirow
add a comment |
I can compile this table separately but when I want to compile the whole file, it gives me an error, which is fixed by removing multirow
.
usepackage{multirow}
begin{table}[htbp]
begin{center}
begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
hline
A & B & C & D & multicolumn{7}{|c|}{F} \ hline
multirow{ 2}{}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
& 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
end{tabular}
end{center}
label{table2}
end{table}
tables multirow
I can compile this table separately but when I want to compile the whole file, it gives me an error, which is fixed by removing multirow
.
usepackage{multirow}
begin{table}[htbp]
begin{center}
begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
hline
A & B & C & D & multicolumn{7}{|c|}{F} \ hline
multirow{ 2}{}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
& 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
end{tabular}
end{center}
label{table2}
end{table}
tables multirow
tables multirow
edited Jun 3 '17 at 14:10
Moriambar
7,83731846
7,83731846
asked Sep 19 '12 at 22:32
annaanna
482148
482148
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
There are some errors in your code; you need to give a second argument to multirow
(an explicit value for the cell width or *
to use the natural width of the contents); also, label
must always appear after caption
in floating environments:
documentclass{article}
usepackage{multirow}
begin{document}
begin{table}[htbp]
centering
begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
hline
A & B & C & D & multicolumn{7}{|c|}{F} \ hline
multirow{ 2}{*}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
& 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
end{tabular}
caption{A test caption}
label{table2}
end{table}
end{document}
It is not clear why you are using p{...}
columns if the cells are not containing paragraphs.
As a side note, I used centering
instead of the center
environment to avoid adding extra vertical spacing (which in most cases is not desired).
You are not using all the columns you declared, but I guess that this was just for the example.
4
Source for multirow
– Jost
Aug 8 '14 at 13:34
7
Note the need for using cline{2-10} if you want a horizontal line between rows 2 and 3.
– Steven C. Howell
Sep 28 '15 at 14:06
3
@Gonzalo Medina In the table environment in the example code, the '' character should be replaced by '\'.
– Abhinav
Jan 31 '17 at 4:17
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%2f73283%2fhow-to-use-multirow%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
There are some errors in your code; you need to give a second argument to multirow
(an explicit value for the cell width or *
to use the natural width of the contents); also, label
must always appear after caption
in floating environments:
documentclass{article}
usepackage{multirow}
begin{document}
begin{table}[htbp]
centering
begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
hline
A & B & C & D & multicolumn{7}{|c|}{F} \ hline
multirow{ 2}{*}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
& 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
end{tabular}
caption{A test caption}
label{table2}
end{table}
end{document}
It is not clear why you are using p{...}
columns if the cells are not containing paragraphs.
As a side note, I used centering
instead of the center
environment to avoid adding extra vertical spacing (which in most cases is not desired).
You are not using all the columns you declared, but I guess that this was just for the example.
4
Source for multirow
– Jost
Aug 8 '14 at 13:34
7
Note the need for using cline{2-10} if you want a horizontal line between rows 2 and 3.
– Steven C. Howell
Sep 28 '15 at 14:06
3
@Gonzalo Medina In the table environment in the example code, the '' character should be replaced by '\'.
– Abhinav
Jan 31 '17 at 4:17
add a comment |
There are some errors in your code; you need to give a second argument to multirow
(an explicit value for the cell width or *
to use the natural width of the contents); also, label
must always appear after caption
in floating environments:
documentclass{article}
usepackage{multirow}
begin{document}
begin{table}[htbp]
centering
begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
hline
A & B & C & D & multicolumn{7}{|c|}{F} \ hline
multirow{ 2}{*}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
& 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
end{tabular}
caption{A test caption}
label{table2}
end{table}
end{document}
It is not clear why you are using p{...}
columns if the cells are not containing paragraphs.
As a side note, I used centering
instead of the center
environment to avoid adding extra vertical spacing (which in most cases is not desired).
You are not using all the columns you declared, but I guess that this was just for the example.
4
Source for multirow
– Jost
Aug 8 '14 at 13:34
7
Note the need for using cline{2-10} if you want a horizontal line between rows 2 and 3.
– Steven C. Howell
Sep 28 '15 at 14:06
3
@Gonzalo Medina In the table environment in the example code, the '' character should be replaced by '\'.
– Abhinav
Jan 31 '17 at 4:17
add a comment |
There are some errors in your code; you need to give a second argument to multirow
(an explicit value for the cell width or *
to use the natural width of the contents); also, label
must always appear after caption
in floating environments:
documentclass{article}
usepackage{multirow}
begin{document}
begin{table}[htbp]
centering
begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
hline
A & B & C & D & multicolumn{7}{|c|}{F} \ hline
multirow{ 2}{*}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
& 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
end{tabular}
caption{A test caption}
label{table2}
end{table}
end{document}
It is not clear why you are using p{...}
columns if the cells are not containing paragraphs.
As a side note, I used centering
instead of the center
environment to avoid adding extra vertical spacing (which in most cases is not desired).
You are not using all the columns you declared, but I guess that this was just for the example.
There are some errors in your code; you need to give a second argument to multirow
(an explicit value for the cell width or *
to use the natural width of the contents); also, label
must always appear after caption
in floating environments:
documentclass{article}
usepackage{multirow}
begin{document}
begin{table}[htbp]
centering
begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
hline
A & B & C & D & multicolumn{7}{|c|}{F} \ hline
multirow{ 2}{*}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
& 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
end{tabular}
caption{A test caption}
label{table2}
end{table}
end{document}
It is not clear why you are using p{...}
columns if the cells are not containing paragraphs.
As a side note, I used centering
instead of the center
environment to avoid adding extra vertical spacing (which in most cases is not desired).
You are not using all the columns you declared, but I guess that this was just for the example.
edited Oct 5 '18 at 22:01
Phelype Oleinik
21.6k54381
21.6k54381
answered Sep 19 '12 at 22:40
Gonzalo MedinaGonzalo Medina
397k4113011569
397k4113011569
4
Source for multirow
– Jost
Aug 8 '14 at 13:34
7
Note the need for using cline{2-10} if you want a horizontal line between rows 2 and 3.
– Steven C. Howell
Sep 28 '15 at 14:06
3
@Gonzalo Medina In the table environment in the example code, the '' character should be replaced by '\'.
– Abhinav
Jan 31 '17 at 4:17
add a comment |
4
Source for multirow
– Jost
Aug 8 '14 at 13:34
7
Note the need for using cline{2-10} if you want a horizontal line between rows 2 and 3.
– Steven C. Howell
Sep 28 '15 at 14:06
3
@Gonzalo Medina In the table environment in the example code, the '' character should be replaced by '\'.
– Abhinav
Jan 31 '17 at 4:17
4
4
Source for multirow
– Jost
Aug 8 '14 at 13:34
Source for multirow
– Jost
Aug 8 '14 at 13:34
7
7
Note the need for using cline{2-10} if you want a horizontal line between rows 2 and 3.
– Steven C. Howell
Sep 28 '15 at 14:06
Note the need for using cline{2-10} if you want a horizontal line between rows 2 and 3.
– Steven C. Howell
Sep 28 '15 at 14:06
3
3
@Gonzalo Medina In the table environment in the example code, the '' character should be replaced by '\'.
– Abhinav
Jan 31 '17 at 4:17
@Gonzalo Medina In the table environment in the example code, the '' character should be replaced by '\'.
– Abhinav
Jan 31 '17 at 4:17
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%2f73283%2fhow-to-use-multirow%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