table, tabular in next line because it is too weid horizontally











up vote
0
down vote

favorite












This is what I want!



enter image description here



But my code doesn't work, it appears like this



enter image description here



    documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish,es-tabla]{babel} % espanol
decimalpoint
usepackage[utf8]{inputenc}
usepackage{graphicx} % graficos

usepackage{amsmath}
usepackage{listings}

usepackage{tikz} %era para hacer los grafos pero no investigué mucho asi que lo hice con word
usetikzlibrary{arrows}

%Header an Footer Stuff

usepackage{fancyhdr}
pagestyle{fancy}
fancyhead{}
fancyfoot{}
fancyfoot[R]{ thepage }


%Hyperlink
usepackage{varioref}
usepackage{hyperref}
usepackage{cleveref}
hypersetup{colorlinks=false}
hypersetup{pdfborder={0 0 0}}


begin{document}

begin{table}[htbp]
caption{Valores optimos Ejercicio 2}
begin{tabular}{| l | l | l | l | l | l | l | l | l | l | l | l | l | l | l | l | l |}
hline
$x_{ij}$ & 1-2 & 1-3 & 1-5 & 2-3 & 2-4 & 2-8 & 3-4 & 3-5 & 4-7 & 4-8 & 5-6 & 5-9\
hline
Valor & 30 & 15 & 14 & 7 & 7 & 16 & 12 & 10 & 7 & 12\
hline
end{tabular}hspace{0pt}%
begin{tabular}{l l | l | l | l | l | l | l | l |}
hline
2-4 & 2-8 & 3-4 & 3-5 & 4-7 & 4-8 & 5-6 & 5-9\
hline
1111 & 8 & 5 & 11 & 12 & 28 & 19 & 0\
hline
end{tabular}hspace{0pt}%
label{tab:vo-ej2}
end{table}

end{document}









share|improve this question









New contributor




EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • your second code fragment with ... code is not useful for anyone debugging your issue, please edit it so that it generates the output that you show,
    – David Carlisle
    12 hours ago










  • however you are only allowing a line break in one place and you have used geometry package to change the page width, so you appear to need to break at a different column.
    – David Carlisle
    12 hours ago










  • remove those hspace{0pt}%s amd do a line break instead. The table will be set as in your first example then.
    – LaRiFaRi
    12 hours ago










  • how do I add a line break ? @LaRiFaRi
    – EmiliOrtega
    11 hours ago










  • @DavidCarlisle I didn't added my code bc it's way long and I just have trouble with that piece of code that I added
    – EmiliOrtega
    11 hours ago















up vote
0
down vote

favorite












This is what I want!



enter image description here



But my code doesn't work, it appears like this



enter image description here



    documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish,es-tabla]{babel} % espanol
decimalpoint
usepackage[utf8]{inputenc}
usepackage{graphicx} % graficos

usepackage{amsmath}
usepackage{listings}

usepackage{tikz} %era para hacer los grafos pero no investigué mucho asi que lo hice con word
usetikzlibrary{arrows}

%Header an Footer Stuff

usepackage{fancyhdr}
pagestyle{fancy}
fancyhead{}
fancyfoot{}
fancyfoot[R]{ thepage }


%Hyperlink
usepackage{varioref}
usepackage{hyperref}
usepackage{cleveref}
hypersetup{colorlinks=false}
hypersetup{pdfborder={0 0 0}}


begin{document}

begin{table}[htbp]
caption{Valores optimos Ejercicio 2}
begin{tabular}{| l | l | l | l | l | l | l | l | l | l | l | l | l | l | l | l | l |}
hline
$x_{ij}$ & 1-2 & 1-3 & 1-5 & 2-3 & 2-4 & 2-8 & 3-4 & 3-5 & 4-7 & 4-8 & 5-6 & 5-9\
hline
Valor & 30 & 15 & 14 & 7 & 7 & 16 & 12 & 10 & 7 & 12\
hline
end{tabular}hspace{0pt}%
begin{tabular}{l l | l | l | l | l | l | l | l |}
hline
2-4 & 2-8 & 3-4 & 3-5 & 4-7 & 4-8 & 5-6 & 5-9\
hline
1111 & 8 & 5 & 11 & 12 & 28 & 19 & 0\
hline
end{tabular}hspace{0pt}%
label{tab:vo-ej2}
end{table}

end{document}









share|improve this question









New contributor




EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • your second code fragment with ... code is not useful for anyone debugging your issue, please edit it so that it generates the output that you show,
    – David Carlisle
    12 hours ago










  • however you are only allowing a line break in one place and you have used geometry package to change the page width, so you appear to need to break at a different column.
    – David Carlisle
    12 hours ago










  • remove those hspace{0pt}%s amd do a line break instead. The table will be set as in your first example then.
    – LaRiFaRi
    12 hours ago










  • how do I add a line break ? @LaRiFaRi
    – EmiliOrtega
    11 hours ago










  • @DavidCarlisle I didn't added my code bc it's way long and I just have trouble with that piece of code that I added
    – EmiliOrtega
    11 hours ago













up vote
0
down vote

favorite









up vote
0
down vote

favorite











This is what I want!



enter image description here



But my code doesn't work, it appears like this



enter image description here



    documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish,es-tabla]{babel} % espanol
decimalpoint
usepackage[utf8]{inputenc}
usepackage{graphicx} % graficos

usepackage{amsmath}
usepackage{listings}

usepackage{tikz} %era para hacer los grafos pero no investigué mucho asi que lo hice con word
usetikzlibrary{arrows}

%Header an Footer Stuff

usepackage{fancyhdr}
pagestyle{fancy}
fancyhead{}
fancyfoot{}
fancyfoot[R]{ thepage }


%Hyperlink
usepackage{varioref}
usepackage{hyperref}
usepackage{cleveref}
hypersetup{colorlinks=false}
hypersetup{pdfborder={0 0 0}}


begin{document}

begin{table}[htbp]
caption{Valores optimos Ejercicio 2}
begin{tabular}{| l | l | l | l | l | l | l | l | l | l | l | l | l | l | l | l | l |}
hline
$x_{ij}$ & 1-2 & 1-3 & 1-5 & 2-3 & 2-4 & 2-8 & 3-4 & 3-5 & 4-7 & 4-8 & 5-6 & 5-9\
hline
Valor & 30 & 15 & 14 & 7 & 7 & 16 & 12 & 10 & 7 & 12\
hline
end{tabular}hspace{0pt}%
begin{tabular}{l l | l | l | l | l | l | l | l |}
hline
2-4 & 2-8 & 3-4 & 3-5 & 4-7 & 4-8 & 5-6 & 5-9\
hline
1111 & 8 & 5 & 11 & 12 & 28 & 19 & 0\
hline
end{tabular}hspace{0pt}%
label{tab:vo-ej2}
end{table}

end{document}









share|improve this question









New contributor




EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











This is what I want!



enter image description here



But my code doesn't work, it appears like this



enter image description here



    documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish,es-tabla]{babel} % espanol
decimalpoint
usepackage[utf8]{inputenc}
usepackage{graphicx} % graficos

usepackage{amsmath}
usepackage{listings}

usepackage{tikz} %era para hacer los grafos pero no investigué mucho asi que lo hice con word
usetikzlibrary{arrows}

%Header an Footer Stuff

usepackage{fancyhdr}
pagestyle{fancy}
fancyhead{}
fancyfoot{}
fancyfoot[R]{ thepage }


%Hyperlink
usepackage{varioref}
usepackage{hyperref}
usepackage{cleveref}
hypersetup{colorlinks=false}
hypersetup{pdfborder={0 0 0}}


begin{document}

begin{table}[htbp]
caption{Valores optimos Ejercicio 2}
begin{tabular}{| l | l | l | l | l | l | l | l | l | l | l | l | l | l | l | l | l |}
hline
$x_{ij}$ & 1-2 & 1-3 & 1-5 & 2-3 & 2-4 & 2-8 & 3-4 & 3-5 & 4-7 & 4-8 & 5-6 & 5-9\
hline
Valor & 30 & 15 & 14 & 7 & 7 & 16 & 12 & 10 & 7 & 12\
hline
end{tabular}hspace{0pt}%
begin{tabular}{l l | l | l | l | l | l | l | l |}
hline
2-4 & 2-8 & 3-4 & 3-5 & 4-7 & 4-8 & 5-6 & 5-9\
hline
1111 & 8 & 5 & 11 & 12 & 28 & 19 & 0\
hline
end{tabular}hspace{0pt}%
label{tab:vo-ej2}
end{table}

end{document}






tables






share|improve this question









New contributor




EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 7 hours ago





















New contributor




EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 13 hours ago









EmiliOrtega

62




62




New contributor




EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • your second code fragment with ... code is not useful for anyone debugging your issue, please edit it so that it generates the output that you show,
    – David Carlisle
    12 hours ago










  • however you are only allowing a line break in one place and you have used geometry package to change the page width, so you appear to need to break at a different column.
    – David Carlisle
    12 hours ago










  • remove those hspace{0pt}%s amd do a line break instead. The table will be set as in your first example then.
    – LaRiFaRi
    12 hours ago










  • how do I add a line break ? @LaRiFaRi
    – EmiliOrtega
    11 hours ago










  • @DavidCarlisle I didn't added my code bc it's way long and I just have trouble with that piece of code that I added
    – EmiliOrtega
    11 hours ago


















  • your second code fragment with ... code is not useful for anyone debugging your issue, please edit it so that it generates the output that you show,
    – David Carlisle
    12 hours ago










  • however you are only allowing a line break in one place and you have used geometry package to change the page width, so you appear to need to break at a different column.
    – David Carlisle
    12 hours ago










  • remove those hspace{0pt}%s amd do a line break instead. The table will be set as in your first example then.
    – LaRiFaRi
    12 hours ago










  • how do I add a line break ? @LaRiFaRi
    – EmiliOrtega
    11 hours ago










  • @DavidCarlisle I didn't added my code bc it's way long and I just have trouble with that piece of code that I added
    – EmiliOrtega
    11 hours ago
















your second code fragment with ... code is not useful for anyone debugging your issue, please edit it so that it generates the output that you show,
– David Carlisle
12 hours ago




your second code fragment with ... code is not useful for anyone debugging your issue, please edit it so that it generates the output that you show,
– David Carlisle
12 hours ago












however you are only allowing a line break in one place and you have used geometry package to change the page width, so you appear to need to break at a different column.
– David Carlisle
12 hours ago




however you are only allowing a line break in one place and you have used geometry package to change the page width, so you appear to need to break at a different column.
– David Carlisle
12 hours ago












remove those hspace{0pt}%s amd do a line break instead. The table will be set as in your first example then.
– LaRiFaRi
12 hours ago




remove those hspace{0pt}%s amd do a line break instead. The table will be set as in your first example then.
– LaRiFaRi
12 hours ago












how do I add a line break ? @LaRiFaRi
– EmiliOrtega
11 hours ago




how do I add a line break ? @LaRiFaRi
– EmiliOrtega
11 hours ago












@DavidCarlisle I didn't added my code bc it's way long and I just have trouble with that piece of code that I added
– EmiliOrtega
11 hours ago




@DavidCarlisle I didn't added my code bc it's way long and I just have trouble with that piece of code that I added
– EmiliOrtega
11 hours ago










1 Answer
1






active

oldest

votes

















up vote
1
down vote













If you want that someone reads and understands your table, you might want to redesign it. What do you think about:



documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish]{babel}
usepackage{booktabs}
usepackage{siunitx}
usepackage{caption}
usepackage{lmodern}
usepackage[utf8]{inputenc}

begin{document}
begin{table}
centering
caption{Valores óptimos Ejercicio 2}label{tab:voed}
begin{tabular}{c S[table-format=2.0]}
toprule
$x_{ij}$ & {Valor} \
midrule
1-2 & 30 \
1-3 & 15 \
1-5 & 14 \
$vdots$ & {$vdots$} \
4-8 & 12 \
bottomrule
end{tabular}qquad
begin{tabular}{c S[table-format=4.0]}
toprule
$x_{ij}$ & {Valor} \
midrule
5-6 & \
5-9 & \
2-4 & 1111 \
$vdots$ & {$vdots$} \
5-9 & 0 \
bottomrule
end{tabular}
end{table}
end{document}


enter image description here






share|improve this answer





















  • @LaRiFRi {c S[table-format=4.0]} those commands belong to ssiunitx ? what does c and S do ? I figured that table-format is to define how large horizontally is my table but I don't get the other ones.. I'm new using latex haha thanks in advance
    – EmiliOrtega
    11 hours ago











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',
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
});


}
});






EmiliOrtega is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461848%2ftable-tabular-in-next-line-because-it-is-too-weid-horizontally%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








up vote
1
down vote













If you want that someone reads and understands your table, you might want to redesign it. What do you think about:



documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish]{babel}
usepackage{booktabs}
usepackage{siunitx}
usepackage{caption}
usepackage{lmodern}
usepackage[utf8]{inputenc}

begin{document}
begin{table}
centering
caption{Valores óptimos Ejercicio 2}label{tab:voed}
begin{tabular}{c S[table-format=2.0]}
toprule
$x_{ij}$ & {Valor} \
midrule
1-2 & 30 \
1-3 & 15 \
1-5 & 14 \
$vdots$ & {$vdots$} \
4-8 & 12 \
bottomrule
end{tabular}qquad
begin{tabular}{c S[table-format=4.0]}
toprule
$x_{ij}$ & {Valor} \
midrule
5-6 & \
5-9 & \
2-4 & 1111 \
$vdots$ & {$vdots$} \
5-9 & 0 \
bottomrule
end{tabular}
end{table}
end{document}


enter image description here






share|improve this answer





















  • @LaRiFRi {c S[table-format=4.0]} those commands belong to ssiunitx ? what does c and S do ? I figured that table-format is to define how large horizontally is my table but I don't get the other ones.. I'm new using latex haha thanks in advance
    – EmiliOrtega
    11 hours ago















up vote
1
down vote













If you want that someone reads and understands your table, you might want to redesign it. What do you think about:



documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish]{babel}
usepackage{booktabs}
usepackage{siunitx}
usepackage{caption}
usepackage{lmodern}
usepackage[utf8]{inputenc}

begin{document}
begin{table}
centering
caption{Valores óptimos Ejercicio 2}label{tab:voed}
begin{tabular}{c S[table-format=2.0]}
toprule
$x_{ij}$ & {Valor} \
midrule
1-2 & 30 \
1-3 & 15 \
1-5 & 14 \
$vdots$ & {$vdots$} \
4-8 & 12 \
bottomrule
end{tabular}qquad
begin{tabular}{c S[table-format=4.0]}
toprule
$x_{ij}$ & {Valor} \
midrule
5-6 & \
5-9 & \
2-4 & 1111 \
$vdots$ & {$vdots$} \
5-9 & 0 \
bottomrule
end{tabular}
end{table}
end{document}


enter image description here






share|improve this answer





















  • @LaRiFRi {c S[table-format=4.0]} those commands belong to ssiunitx ? what does c and S do ? I figured that table-format is to define how large horizontally is my table but I don't get the other ones.. I'm new using latex haha thanks in advance
    – EmiliOrtega
    11 hours ago













up vote
1
down vote










up vote
1
down vote









If you want that someone reads and understands your table, you might want to redesign it. What do you think about:



documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish]{babel}
usepackage{booktabs}
usepackage{siunitx}
usepackage{caption}
usepackage{lmodern}
usepackage[utf8]{inputenc}

begin{document}
begin{table}
centering
caption{Valores óptimos Ejercicio 2}label{tab:voed}
begin{tabular}{c S[table-format=2.0]}
toprule
$x_{ij}$ & {Valor} \
midrule
1-2 & 30 \
1-3 & 15 \
1-5 & 14 \
$vdots$ & {$vdots$} \
4-8 & 12 \
bottomrule
end{tabular}qquad
begin{tabular}{c S[table-format=4.0]}
toprule
$x_{ij}$ & {Valor} \
midrule
5-6 & \
5-9 & \
2-4 & 1111 \
$vdots$ & {$vdots$} \
5-9 & 0 \
bottomrule
end{tabular}
end{table}
end{document}


enter image description here






share|improve this answer












If you want that someone reads and understands your table, you might want to redesign it. What do you think about:



documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish]{babel}
usepackage{booktabs}
usepackage{siunitx}
usepackage{caption}
usepackage{lmodern}
usepackage[utf8]{inputenc}

begin{document}
begin{table}
centering
caption{Valores óptimos Ejercicio 2}label{tab:voed}
begin{tabular}{c S[table-format=2.0]}
toprule
$x_{ij}$ & {Valor} \
midrule
1-2 & 30 \
1-3 & 15 \
1-5 & 14 \
$vdots$ & {$vdots$} \
4-8 & 12 \
bottomrule
end{tabular}qquad
begin{tabular}{c S[table-format=4.0]}
toprule
$x_{ij}$ & {Valor} \
midrule
5-6 & \
5-9 & \
2-4 & 1111 \
$vdots$ & {$vdots$} \
5-9 & 0 \
bottomrule
end{tabular}
end{table}
end{document}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered 12 hours ago









LaRiFaRi

35.5k244120




35.5k244120












  • @LaRiFRi {c S[table-format=4.0]} those commands belong to ssiunitx ? what does c and S do ? I figured that table-format is to define how large horizontally is my table but I don't get the other ones.. I'm new using latex haha thanks in advance
    – EmiliOrtega
    11 hours ago


















  • @LaRiFRi {c S[table-format=4.0]} those commands belong to ssiunitx ? what does c and S do ? I figured that table-format is to define how large horizontally is my table but I don't get the other ones.. I'm new using latex haha thanks in advance
    – EmiliOrtega
    11 hours ago
















@LaRiFRi {c S[table-format=4.0]} those commands belong to ssiunitx ? what does c and S do ? I figured that table-format is to define how large horizontally is my table but I don't get the other ones.. I'm new using latex haha thanks in advance
– EmiliOrtega
11 hours ago




@LaRiFRi {c S[table-format=4.0]} those commands belong to ssiunitx ? what does c and S do ? I figured that table-format is to define how large horizontally is my table but I don't get the other ones.. I'm new using latex haha thanks in advance
– EmiliOrtega
11 hours ago










EmiliOrtega is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















EmiliOrtega is a new contributor. Be nice, and check out our Code of Conduct.













EmiliOrtega is a new contributor. Be nice, and check out our Code of Conduct.












EmiliOrtega is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461848%2ftable-tabular-in-next-line-because-it-is-too-weid-horizontally%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

サソリ

広島県道265号伴広島線

Accessing regular linux commands in Huawei's Dopra Linux