How to get symbols on the lines of a table
I want to generate a table like this with latex. Can you help?
I can write a normal table as below, but have no idea how to create those symbols on the lines.
begin{table}[htbp]
centering
caption{Add caption}
begin{tabular}{|l|l|l|}
toprule
& Scenario 1 & Scenario 2 \
midrule
Val 1 & x & y \
midrule
Val 2 & x & Z \
bottomrule
end{tabular}%
label{tab:addlabel}%
end{table}%
tables symbols
New contributor
add a comment |
I want to generate a table like this with latex. Can you help?
I can write a normal table as below, but have no idea how to create those symbols on the lines.
begin{table}[htbp]
centering
caption{Add caption}
begin{tabular}{|l|l|l|}
toprule
& Scenario 1 & Scenario 2 \
midrule
Val 1 & x & y \
midrule
Val 2 & x & Z \
bottomrule
end{tabular}%
label{tab:addlabel}%
end{table}%
tables symbols
New contributor
add a comment |
I want to generate a table like this with latex. Can you help?
I can write a normal table as below, but have no idea how to create those symbols on the lines.
begin{table}[htbp]
centering
caption{Add caption}
begin{tabular}{|l|l|l|}
toprule
& Scenario 1 & Scenario 2 \
midrule
Val 1 & x & y \
midrule
Val 2 & x & Z \
bottomrule
end{tabular}%
label{tab:addlabel}%
end{table}%
tables symbols
New contributor
I want to generate a table like this with latex. Can you help?
I can write a normal table as below, but have no idea how to create those symbols on the lines.
begin{table}[htbp]
centering
caption{Add caption}
begin{tabular}{|l|l|l|}
toprule
& Scenario 1 & Scenario 2 \
midrule
Val 1 & x & y \
midrule
Val 2 & x & Z \
bottomrule
end{tabular}%
label{tab:addlabel}%
end{table}%
tables symbols
tables symbols
New contributor
New contributor
edited 1 hour ago
Raaja
2,1722630
2,1722630
New contributor
asked 1 hour ago
mucalinda
61
61
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
This is a solution using tikz
documentclass[tikz, border = 5pt]{standalone}
usetikzlibrary{matrix}
usetikzlibrary{calc}
tikzset{
table/.style={
matrix of nodes,
row sep=-pgflinewidth,
column sep=-pgflinewidth,
nodes={
rectangle,
draw,
text width=6em,
align=center
},
minimum height=1.2cm,
text depth=0.5ex,
text height=2ex,
nodes in empty cells,
row 1/.style={
minimum height=0.5cm,
},
column 1/.style={
nodes={
text width=3em
}
}
},
circ/.style={
draw=green,
circle,
fill=white,
thick,
minimum width=0.8cm
}
}
begin{document}
begin{tikzpicture}
matrix (table) [ampersand replacement=&, table]
{
& Scenario 1 & Scenario 2 \
Val 1 & $alpha + beta^2$ & $gamma + betadelta^2$ \
Val 2 & $alpha + beta^2$ & $alpha + beta^2$ \
};
node[circ] (less) at ($(table-2-2)!0.5!(table-2-3)$){$<$};
node[circ] (equals) at ($(table-2-2)!0.5!(table-3-2)$){$=$};
node[circ] (question) at ($(table-3-2)!0.5!(table-3-3)$){$?$};
node[circ, rotate = -90] (greater) at ($(table-2-3)!0.5!(table-3-3)$){$>$};
end{tikzpicture}
end{document}
Thank you so much. I was wondering if the cells can be of different sizes? column headers and row headers are of different size compared to value cells in the table.
– mucalinda
26 mins ago
@mucalinda Sure, how about now?
– caverac
8 mins ago
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
});
}
});
mucalinda 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%2f468117%2fhow-to-get-symbols-on-the-lines-of-a-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
This is a solution using tikz
documentclass[tikz, border = 5pt]{standalone}
usetikzlibrary{matrix}
usetikzlibrary{calc}
tikzset{
table/.style={
matrix of nodes,
row sep=-pgflinewidth,
column sep=-pgflinewidth,
nodes={
rectangle,
draw,
text width=6em,
align=center
},
minimum height=1.2cm,
text depth=0.5ex,
text height=2ex,
nodes in empty cells,
row 1/.style={
minimum height=0.5cm,
},
column 1/.style={
nodes={
text width=3em
}
}
},
circ/.style={
draw=green,
circle,
fill=white,
thick,
minimum width=0.8cm
}
}
begin{document}
begin{tikzpicture}
matrix (table) [ampersand replacement=&, table]
{
& Scenario 1 & Scenario 2 \
Val 1 & $alpha + beta^2$ & $gamma + betadelta^2$ \
Val 2 & $alpha + beta^2$ & $alpha + beta^2$ \
};
node[circ] (less) at ($(table-2-2)!0.5!(table-2-3)$){$<$};
node[circ] (equals) at ($(table-2-2)!0.5!(table-3-2)$){$=$};
node[circ] (question) at ($(table-3-2)!0.5!(table-3-3)$){$?$};
node[circ, rotate = -90] (greater) at ($(table-2-3)!0.5!(table-3-3)$){$>$};
end{tikzpicture}
end{document}
Thank you so much. I was wondering if the cells can be of different sizes? column headers and row headers are of different size compared to value cells in the table.
– mucalinda
26 mins ago
@mucalinda Sure, how about now?
– caverac
8 mins ago
add a comment |
This is a solution using tikz
documentclass[tikz, border = 5pt]{standalone}
usetikzlibrary{matrix}
usetikzlibrary{calc}
tikzset{
table/.style={
matrix of nodes,
row sep=-pgflinewidth,
column sep=-pgflinewidth,
nodes={
rectangle,
draw,
text width=6em,
align=center
},
minimum height=1.2cm,
text depth=0.5ex,
text height=2ex,
nodes in empty cells,
row 1/.style={
minimum height=0.5cm,
},
column 1/.style={
nodes={
text width=3em
}
}
},
circ/.style={
draw=green,
circle,
fill=white,
thick,
minimum width=0.8cm
}
}
begin{document}
begin{tikzpicture}
matrix (table) [ampersand replacement=&, table]
{
& Scenario 1 & Scenario 2 \
Val 1 & $alpha + beta^2$ & $gamma + betadelta^2$ \
Val 2 & $alpha + beta^2$ & $alpha + beta^2$ \
};
node[circ] (less) at ($(table-2-2)!0.5!(table-2-3)$){$<$};
node[circ] (equals) at ($(table-2-2)!0.5!(table-3-2)$){$=$};
node[circ] (question) at ($(table-3-2)!0.5!(table-3-3)$){$?$};
node[circ, rotate = -90] (greater) at ($(table-2-3)!0.5!(table-3-3)$){$>$};
end{tikzpicture}
end{document}
Thank you so much. I was wondering if the cells can be of different sizes? column headers and row headers are of different size compared to value cells in the table.
– mucalinda
26 mins ago
@mucalinda Sure, how about now?
– caverac
8 mins ago
add a comment |
This is a solution using tikz
documentclass[tikz, border = 5pt]{standalone}
usetikzlibrary{matrix}
usetikzlibrary{calc}
tikzset{
table/.style={
matrix of nodes,
row sep=-pgflinewidth,
column sep=-pgflinewidth,
nodes={
rectangle,
draw,
text width=6em,
align=center
},
minimum height=1.2cm,
text depth=0.5ex,
text height=2ex,
nodes in empty cells,
row 1/.style={
minimum height=0.5cm,
},
column 1/.style={
nodes={
text width=3em
}
}
},
circ/.style={
draw=green,
circle,
fill=white,
thick,
minimum width=0.8cm
}
}
begin{document}
begin{tikzpicture}
matrix (table) [ampersand replacement=&, table]
{
& Scenario 1 & Scenario 2 \
Val 1 & $alpha + beta^2$ & $gamma + betadelta^2$ \
Val 2 & $alpha + beta^2$ & $alpha + beta^2$ \
};
node[circ] (less) at ($(table-2-2)!0.5!(table-2-3)$){$<$};
node[circ] (equals) at ($(table-2-2)!0.5!(table-3-2)$){$=$};
node[circ] (question) at ($(table-3-2)!0.5!(table-3-3)$){$?$};
node[circ, rotate = -90] (greater) at ($(table-2-3)!0.5!(table-3-3)$){$>$};
end{tikzpicture}
end{document}
This is a solution using tikz
documentclass[tikz, border = 5pt]{standalone}
usetikzlibrary{matrix}
usetikzlibrary{calc}
tikzset{
table/.style={
matrix of nodes,
row sep=-pgflinewidth,
column sep=-pgflinewidth,
nodes={
rectangle,
draw,
text width=6em,
align=center
},
minimum height=1.2cm,
text depth=0.5ex,
text height=2ex,
nodes in empty cells,
row 1/.style={
minimum height=0.5cm,
},
column 1/.style={
nodes={
text width=3em
}
}
},
circ/.style={
draw=green,
circle,
fill=white,
thick,
minimum width=0.8cm
}
}
begin{document}
begin{tikzpicture}
matrix (table) [ampersand replacement=&, table]
{
& Scenario 1 & Scenario 2 \
Val 1 & $alpha + beta^2$ & $gamma + betadelta^2$ \
Val 2 & $alpha + beta^2$ & $alpha + beta^2$ \
};
node[circ] (less) at ($(table-2-2)!0.5!(table-2-3)$){$<$};
node[circ] (equals) at ($(table-2-2)!0.5!(table-3-2)$){$=$};
node[circ] (question) at ($(table-3-2)!0.5!(table-3-3)$){$?$};
node[circ, rotate = -90] (greater) at ($(table-2-3)!0.5!(table-3-3)$){$>$};
end{tikzpicture}
end{document}
edited 8 mins ago
answered 59 mins ago
caverac
5,6031522
5,6031522
Thank you so much. I was wondering if the cells can be of different sizes? column headers and row headers are of different size compared to value cells in the table.
– mucalinda
26 mins ago
@mucalinda Sure, how about now?
– caverac
8 mins ago
add a comment |
Thank you so much. I was wondering if the cells can be of different sizes? column headers and row headers are of different size compared to value cells in the table.
– mucalinda
26 mins ago
@mucalinda Sure, how about now?
– caverac
8 mins ago
Thank you so much. I was wondering if the cells can be of different sizes? column headers and row headers are of different size compared to value cells in the table.
– mucalinda
26 mins ago
Thank you so much. I was wondering if the cells can be of different sizes? column headers and row headers are of different size compared to value cells in the table.
– mucalinda
26 mins ago
@mucalinda Sure, how about now?
– caverac
8 mins ago
@mucalinda Sure, how about now?
– caverac
8 mins ago
add a comment |
mucalinda is a new contributor. Be nice, and check out our Code of Conduct.
mucalinda is a new contributor. Be nice, and check out our Code of Conduct.
mucalinda is a new contributor. Be nice, and check out our Code of Conduct.
mucalinda 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.
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%2f468117%2fhow-to-get-symbols-on-the-lines-of-a-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