How can I solve this problem with latex table?
I want to make a table like this:
So I tried with this Latex code:
begin{table}[h!]
begin{center}
begin{tabular}{|l|c|c|}
hline multirow{2}{3cm}{Filter Type} &
multicolumn{2}{|c|}{Ideal impulse response $h_D(n)$} \
cline{2-2} & $h_D(n), ; nneq 0$ & $h_D(0)$ \ hline
end{tabular}
end{center}
end{table}
But I get this table instead:
I don't know how to fix my problem, so I appreciate if someone could help me.
tables
add a comment |
I want to make a table like this:
So I tried with this Latex code:
begin{table}[h!]
begin{center}
begin{tabular}{|l|c|c|}
hline multirow{2}{3cm}{Filter Type} &
multicolumn{2}{|c|}{Ideal impulse response $h_D(n)$} \
cline{2-2} & $h_D(n), ; nneq 0$ & $h_D(0)$ \ hline
end{tabular}
end{center}
end{table}
But I get this table instead:
I don't know how to fix my problem, so I appreciate if someone could help me.
tables
2
Welcome to TeX.SE! Writecline{2-3}
instead ofcline{2-2}
.
– CarLaTeX
Dec 8 at 10:43
Wow, I didn't know it was so simple, maybe I should get more information about de cline command. Thank you so much!
– Josemi
Dec 8 at 10:45
Also replace both thec
columns with>{centeringarraybackslash}p{2.5cm}
columns in order to have space too (length 2.5 cm is just a guess... test it)
– koleygr
Dec 8 at 10:47
You're welcome! The syntax iscline{StartColumn-EndColumn}
.
– CarLaTeX
Dec 8 at 10:55
Welcome to TeX - LaTeX! In general it is better post a complete minimal document that we can compile, rather than a code snippet, cf. minimal working example (MWE)
– Andrew Swann
Dec 8 at 10:59
add a comment |
I want to make a table like this:
So I tried with this Latex code:
begin{table}[h!]
begin{center}
begin{tabular}{|l|c|c|}
hline multirow{2}{3cm}{Filter Type} &
multicolumn{2}{|c|}{Ideal impulse response $h_D(n)$} \
cline{2-2} & $h_D(n), ; nneq 0$ & $h_D(0)$ \ hline
end{tabular}
end{center}
end{table}
But I get this table instead:
I don't know how to fix my problem, so I appreciate if someone could help me.
tables
I want to make a table like this:
So I tried with this Latex code:
begin{table}[h!]
begin{center}
begin{tabular}{|l|c|c|}
hline multirow{2}{3cm}{Filter Type} &
multicolumn{2}{|c|}{Ideal impulse response $h_D(n)$} \
cline{2-2} & $h_D(n), ; nneq 0$ & $h_D(0)$ \ hline
end{tabular}
end{center}
end{table}
But I get this table instead:
I don't know how to fix my problem, so I appreciate if someone could help me.
tables
tables
edited Dec 8 at 10:43
CarLaTeX
29.4k447125
29.4k447125
asked Dec 8 at 10:38
Josemi
794
794
2
Welcome to TeX.SE! Writecline{2-3}
instead ofcline{2-2}
.
– CarLaTeX
Dec 8 at 10:43
Wow, I didn't know it was so simple, maybe I should get more information about de cline command. Thank you so much!
– Josemi
Dec 8 at 10:45
Also replace both thec
columns with>{centeringarraybackslash}p{2.5cm}
columns in order to have space too (length 2.5 cm is just a guess... test it)
– koleygr
Dec 8 at 10:47
You're welcome! The syntax iscline{StartColumn-EndColumn}
.
– CarLaTeX
Dec 8 at 10:55
Welcome to TeX - LaTeX! In general it is better post a complete minimal document that we can compile, rather than a code snippet, cf. minimal working example (MWE)
– Andrew Swann
Dec 8 at 10:59
add a comment |
2
Welcome to TeX.SE! Writecline{2-3}
instead ofcline{2-2}
.
– CarLaTeX
Dec 8 at 10:43
Wow, I didn't know it was so simple, maybe I should get more information about de cline command. Thank you so much!
– Josemi
Dec 8 at 10:45
Also replace both thec
columns with>{centeringarraybackslash}p{2.5cm}
columns in order to have space too (length 2.5 cm is just a guess... test it)
– koleygr
Dec 8 at 10:47
You're welcome! The syntax iscline{StartColumn-EndColumn}
.
– CarLaTeX
Dec 8 at 10:55
Welcome to TeX - LaTeX! In general it is better post a complete minimal document that we can compile, rather than a code snippet, cf. minimal working example (MWE)
– Andrew Swann
Dec 8 at 10:59
2
2
Welcome to TeX.SE! Write
cline{2-3}
instead of cline{2-2}
.– CarLaTeX
Dec 8 at 10:43
Welcome to TeX.SE! Write
cline{2-3}
instead of cline{2-2}
.– CarLaTeX
Dec 8 at 10:43
Wow, I didn't know it was so simple, maybe I should get more information about de cline command. Thank you so much!
– Josemi
Dec 8 at 10:45
Wow, I didn't know it was so simple, maybe I should get more information about de cline command. Thank you so much!
– Josemi
Dec 8 at 10:45
Also replace both the
c
columns with >{centeringarraybackslash}p{2.5cm}
columns in order to have space too (length 2.5 cm is just a guess... test it)– koleygr
Dec 8 at 10:47
Also replace both the
c
columns with >{centeringarraybackslash}p{2.5cm}
columns in order to have space too (length 2.5 cm is just a guess... test it)– koleygr
Dec 8 at 10:47
You're welcome! The syntax is
cline{StartColumn-EndColumn}
.– CarLaTeX
Dec 8 at 10:55
You're welcome! The syntax is
cline{StartColumn-EndColumn}
.– CarLaTeX
Dec 8 at 10:55
Welcome to TeX - LaTeX! In general it is better post a complete minimal document that we can compile, rather than a code snippet, cf. minimal working example (MWE)
– Andrew Swann
Dec 8 at 10:59
Welcome to TeX - LaTeX! In general it is better post a complete minimal document that we can compile, rather than a code snippet, cf. minimal working example (MWE)
– Andrew Swann
Dec 8 at 10:59
add a comment |
1 Answer
1
active
oldest
votes
A minimal modification to your code to get the vertical placing of "Filter Type" and the requested rule is:
documentclass{article}
begin{document}
begin{table}[h!]
begin{center}
begin{tabular}{|l|c|c|}
hline Filter Type
& multicolumn{2}{|c|}{Ideal impulse response $h_D(n)$} \
cline{2-3} & $h_D(n), ; nneq 0$ & $h_D(0)$ \ hline
end{tabular}
end{center}
end{table}
end{document}
However, you should consider whether you need all these vertical rules. I guess this is just heading material for a table, in which case I would suggest:
documentclass{article}
usepackage{booktabs}
begin{document}
begin{center}
begin{tabular}{l*{2}{c}}
toprule
Filter Type
& multicolumn{2}{c}{Ideal impulse response $h_D(n)$} \
& $nneq 0$ & $n=0$ \
midrule
X&$2$&$-1$\
Y&$3$&$2$ \
bottomrule
end{tabular}
end{center}
end{document}
Note that a table
environment is not necessary, particularly if you want placement at a particular point on the page. If you need a caption, then the captionof
command from the caption
package can be used.
See the documentation of the booktabs
package for more advice on good style for tables.
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%2f463788%2fhow-can-i-solve-this-problem-with-latex-table%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
A minimal modification to your code to get the vertical placing of "Filter Type" and the requested rule is:
documentclass{article}
begin{document}
begin{table}[h!]
begin{center}
begin{tabular}{|l|c|c|}
hline Filter Type
& multicolumn{2}{|c|}{Ideal impulse response $h_D(n)$} \
cline{2-3} & $h_D(n), ; nneq 0$ & $h_D(0)$ \ hline
end{tabular}
end{center}
end{table}
end{document}
However, you should consider whether you need all these vertical rules. I guess this is just heading material for a table, in which case I would suggest:
documentclass{article}
usepackage{booktabs}
begin{document}
begin{center}
begin{tabular}{l*{2}{c}}
toprule
Filter Type
& multicolumn{2}{c}{Ideal impulse response $h_D(n)$} \
& $nneq 0$ & $n=0$ \
midrule
X&$2$&$-1$\
Y&$3$&$2$ \
bottomrule
end{tabular}
end{center}
end{document}
Note that a table
environment is not necessary, particularly if you want placement at a particular point on the page. If you need a caption, then the captionof
command from the caption
package can be used.
See the documentation of the booktabs
package for more advice on good style for tables.
add a comment |
A minimal modification to your code to get the vertical placing of "Filter Type" and the requested rule is:
documentclass{article}
begin{document}
begin{table}[h!]
begin{center}
begin{tabular}{|l|c|c|}
hline Filter Type
& multicolumn{2}{|c|}{Ideal impulse response $h_D(n)$} \
cline{2-3} & $h_D(n), ; nneq 0$ & $h_D(0)$ \ hline
end{tabular}
end{center}
end{table}
end{document}
However, you should consider whether you need all these vertical rules. I guess this is just heading material for a table, in which case I would suggest:
documentclass{article}
usepackage{booktabs}
begin{document}
begin{center}
begin{tabular}{l*{2}{c}}
toprule
Filter Type
& multicolumn{2}{c}{Ideal impulse response $h_D(n)$} \
& $nneq 0$ & $n=0$ \
midrule
X&$2$&$-1$\
Y&$3$&$2$ \
bottomrule
end{tabular}
end{center}
end{document}
Note that a table
environment is not necessary, particularly if you want placement at a particular point on the page. If you need a caption, then the captionof
command from the caption
package can be used.
See the documentation of the booktabs
package for more advice on good style for tables.
add a comment |
A minimal modification to your code to get the vertical placing of "Filter Type" and the requested rule is:
documentclass{article}
begin{document}
begin{table}[h!]
begin{center}
begin{tabular}{|l|c|c|}
hline Filter Type
& multicolumn{2}{|c|}{Ideal impulse response $h_D(n)$} \
cline{2-3} & $h_D(n), ; nneq 0$ & $h_D(0)$ \ hline
end{tabular}
end{center}
end{table}
end{document}
However, you should consider whether you need all these vertical rules. I guess this is just heading material for a table, in which case I would suggest:
documentclass{article}
usepackage{booktabs}
begin{document}
begin{center}
begin{tabular}{l*{2}{c}}
toprule
Filter Type
& multicolumn{2}{c}{Ideal impulse response $h_D(n)$} \
& $nneq 0$ & $n=0$ \
midrule
X&$2$&$-1$\
Y&$3$&$2$ \
bottomrule
end{tabular}
end{center}
end{document}
Note that a table
environment is not necessary, particularly if you want placement at a particular point on the page. If you need a caption, then the captionof
command from the caption
package can be used.
See the documentation of the booktabs
package for more advice on good style for tables.
A minimal modification to your code to get the vertical placing of "Filter Type" and the requested rule is:
documentclass{article}
begin{document}
begin{table}[h!]
begin{center}
begin{tabular}{|l|c|c|}
hline Filter Type
& multicolumn{2}{|c|}{Ideal impulse response $h_D(n)$} \
cline{2-3} & $h_D(n), ; nneq 0$ & $h_D(0)$ \ hline
end{tabular}
end{center}
end{table}
end{document}
However, you should consider whether you need all these vertical rules. I guess this is just heading material for a table, in which case I would suggest:
documentclass{article}
usepackage{booktabs}
begin{document}
begin{center}
begin{tabular}{l*{2}{c}}
toprule
Filter Type
& multicolumn{2}{c}{Ideal impulse response $h_D(n)$} \
& $nneq 0$ & $n=0$ \
midrule
X&$2$&$-1$\
Y&$3$&$2$ \
bottomrule
end{tabular}
end{center}
end{document}
Note that a table
environment is not necessary, particularly if you want placement at a particular point on the page. If you need a caption, then the captionof
command from the caption
package can be used.
See the documentation of the booktabs
package for more advice on good style for tables.
answered Dec 8 at 11:04
Andrew Swann
76.6k9128325
76.6k9128325
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f463788%2fhow-can-i-solve-this-problem-with-latex-table%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
2
Welcome to TeX.SE! Write
cline{2-3}
instead ofcline{2-2}
.– CarLaTeX
Dec 8 at 10:43
Wow, I didn't know it was so simple, maybe I should get more information about de cline command. Thank you so much!
– Josemi
Dec 8 at 10:45
Also replace both the
c
columns with>{centeringarraybackslash}p{2.5cm}
columns in order to have space too (length 2.5 cm is just a guess... test it)– koleygr
Dec 8 at 10:47
You're welcome! The syntax is
cline{StartColumn-EndColumn}
.– CarLaTeX
Dec 8 at 10:55
Welcome to TeX - LaTeX! In general it is better post a complete minimal document that we can compile, rather than a code snippet, cf. minimal working example (MWE)
– Andrew Swann
Dec 8 at 10:59