Prevent spreading of words in: Left aligned, automatically wrapped text, in a table











up vote
0
down vote

favorite












I am trying to get a text left aligned in a table that automatically wraps text at a specified, varying column width.
Without: LaTex adding extra spaces between words to reach the other side (right side) of the column.



My 2 main approaches consist of using the tabular and tabularx environment but both approaches end up spreading the words out from left to right except for the last line.



An example of the desired output:
Excel does not add the extra spaces in a left alignment with a wrapped text



MWE Tabular environment:



documentclass{article}
usepackage[utf8]{inputenc}

begin{document}


section{Introduction}
test
begin{table}
%begin{tabular}{|l|l|l|l|l|l|l|}
hspace*{-11.50em}
begin{tabular}{|p{3cm}|p{3cm}|p{2.5cm}|p{2cm}|p{2.cm}|p{2.cm}|p{2.cm}|}
hline
Week2Lecture2 ANN: Perceptrons, MLP and Backpropagation & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 9. 5.a. Notation & & & \ hline
W2L3 ANN: Training and building MLPs & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 12. 5.d Gradient descent & 13. 5.e Training Neural Networks & 10. 5.b. Model Architecture & 11. 5.c Loss Function \ hline
W3L4 Reinforcement Learning & 4. 2.a. Reinforcement Learning & & & & & \ hline
W3L5 Genetic Algorithms & 3. 1.c Evolutionairy Computing & 5. 3.a. Evolutionairy computing & & & & \ hline
W4L6 Swarm Intelligence & 6. 3.b. Swarm Intelligence & & & & & \ hline
W4L7 CI Math and Principles Overview & 9. 5.a. Notation & 7. 3.c Bayesian Reasoning & & & & \ hline
W5L8 ANN: Unsupervised & 2. 1.b. Neural Networks UnSupervised & & & & & \ hline
W5L9 ANN: Deep/Recurrent and Gradient Descent & 12. 5.d Gradient descent & 4. 2.a. Reinforcement Learning & 11. 5.c Loss Function & & & \ hline
W6L10 Evolutionary Strategies, Genetic Programming & 5. 3.a. Evolutionairy computing & 3. 1.c Evolutionairy Computing & & & & \ hline
W6L11 Mixed CI strategies & All & & & & & \ hline
W6L12 (Werkcollege) Swarm routing & 6. 3.b. Swarm Intelligence & & & & & \ hline
end{tabular}
end{table}
end{document}


Yielding:
This is the compilation of the tabular approach
As you can see, for example the words "Perceptrons, MLP" in cell 1,1 get stretched out.



MWE Tabularx environment:



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tabularx}
usepackage{booktabs}
usepackage{caption}

begin{document}


section{Introduction}
test


begin{table}[htbp]
caption{attempt 11 fix column width}
hspace*{-13.2em}
%begin{tabularx}{1.7columnwidth}{@{}|l|X@{}|}
begin{tabularx}{1.6columnwidth}{|p{3cm}|p{3cm}|}
toprule
multicolumn{1}{c}{years} & multicolumn{1}{c}{description} \
midrule
hline
1954--1960 & Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur varius et ex ut efficitur. Phasellus quis commodo diam. Nulla eu aliquet mauris. Nunc dapibus nisi ac lorem pretium aliquet. Sed posuere semper augue vel lacinia. Duis neque diam, ullamcorper in aliquam in, posuere id enim. Cras dui nulla, iaculis quis mauris in, vestibulum maximus nulla. Nulla et enim mollis, ullamcorper dui quis, pretium lacus. Fusce vitae rutrum diam. Ut a odio tortor. Vestibulum non tincidunt est. Etiam sit amet auctor est.\ toprule %hline %addlinespace
bottomrule
1954--1960 & Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur varius et ex ut efficitur. Phasellus quis commodo diam. Nulla eu aliquet mauris. Nunc dapibus nisi ac lorem pretium aliquet. Sed posuere semper augue vel lacinia. Duis neque diam, ullamcorper in aliquam in, posuere id enim. Cras dui nulla, iaculis quis mauris in, vestibulum maximus nulla. Nulla et enim mollis, ullamcorper dui quis, pretium lacus. Fusce vitae rutrum diam. Ut a odio tortor. Vestibulum non tincidunt est. Etiam sit amet auctor est.\ hline addlinespace
1954--1960 & Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur varius et ex ut efficitur. Phasellus quis commodo diam. Nulla eu aliquet mauris. Nunc dapibus nisi ac lorem pretium aliquet. Sed posuere semper augue vel lacinia. Duis neque diam, ullamcorper in aliquam in, posuere id enim. Cras dui nulla, iaculis quis mauris in, vestibulum maximus nulla. Nulla et enim mollis, ullamcorper dui quis, pretium lacus. Fusce vitae rutrum diam. Ut a odio tortor. Vestibulum non tincidunt est. Etiam sit amet auctor est.\ hline addlinespace
bottomrule
end{tabularx}
label{tab:res}%
end{table}

end{document}


Yielding:
enter image description here



Which also spreads the words. Any suggestions on how to prevent the spreading of those words, whilst keeping the same words per line, with the fixed column width and the same word breaks would be much appreciated!










share|improve this question














bumped to the homepage by Community 5 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 2




    How to create fixed width table columns with text raggedright/centered/raggedleft? and How to avoid justified text in tabularx? should give you an idea on how to achieve raggedright text in p and X type columns.
    – leandriis
    Sep 13 at 14:15










  • @leandriis Thank you very much! I was unable to figure it out after 12 attempts, and did apparently not know the right search terms.
    – a.t.
    Sep 13 at 14:31

















up vote
0
down vote

favorite












I am trying to get a text left aligned in a table that automatically wraps text at a specified, varying column width.
Without: LaTex adding extra spaces between words to reach the other side (right side) of the column.



My 2 main approaches consist of using the tabular and tabularx environment but both approaches end up spreading the words out from left to right except for the last line.



An example of the desired output:
Excel does not add the extra spaces in a left alignment with a wrapped text



MWE Tabular environment:



documentclass{article}
usepackage[utf8]{inputenc}

begin{document}


section{Introduction}
test
begin{table}
%begin{tabular}{|l|l|l|l|l|l|l|}
hspace*{-11.50em}
begin{tabular}{|p{3cm}|p{3cm}|p{2.5cm}|p{2cm}|p{2.cm}|p{2.cm}|p{2.cm}|}
hline
Week2Lecture2 ANN: Perceptrons, MLP and Backpropagation & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 9. 5.a. Notation & & & \ hline
W2L3 ANN: Training and building MLPs & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 12. 5.d Gradient descent & 13. 5.e Training Neural Networks & 10. 5.b. Model Architecture & 11. 5.c Loss Function \ hline
W3L4 Reinforcement Learning & 4. 2.a. Reinforcement Learning & & & & & \ hline
W3L5 Genetic Algorithms & 3. 1.c Evolutionairy Computing & 5. 3.a. Evolutionairy computing & & & & \ hline
W4L6 Swarm Intelligence & 6. 3.b. Swarm Intelligence & & & & & \ hline
W4L7 CI Math and Principles Overview & 9. 5.a. Notation & 7. 3.c Bayesian Reasoning & & & & \ hline
W5L8 ANN: Unsupervised & 2. 1.b. Neural Networks UnSupervised & & & & & \ hline
W5L9 ANN: Deep/Recurrent and Gradient Descent & 12. 5.d Gradient descent & 4. 2.a. Reinforcement Learning & 11. 5.c Loss Function & & & \ hline
W6L10 Evolutionary Strategies, Genetic Programming & 5. 3.a. Evolutionairy computing & 3. 1.c Evolutionairy Computing & & & & \ hline
W6L11 Mixed CI strategies & All & & & & & \ hline
W6L12 (Werkcollege) Swarm routing & 6. 3.b. Swarm Intelligence & & & & & \ hline
end{tabular}
end{table}
end{document}


Yielding:
This is the compilation of the tabular approach
As you can see, for example the words "Perceptrons, MLP" in cell 1,1 get stretched out.



MWE Tabularx environment:



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tabularx}
usepackage{booktabs}
usepackage{caption}

begin{document}


section{Introduction}
test


begin{table}[htbp]
caption{attempt 11 fix column width}
hspace*{-13.2em}
%begin{tabularx}{1.7columnwidth}{@{}|l|X@{}|}
begin{tabularx}{1.6columnwidth}{|p{3cm}|p{3cm}|}
toprule
multicolumn{1}{c}{years} & multicolumn{1}{c}{description} \
midrule
hline
1954--1960 & Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur varius et ex ut efficitur. Phasellus quis commodo diam. Nulla eu aliquet mauris. Nunc dapibus nisi ac lorem pretium aliquet. Sed posuere semper augue vel lacinia. Duis neque diam, ullamcorper in aliquam in, posuere id enim. Cras dui nulla, iaculis quis mauris in, vestibulum maximus nulla. Nulla et enim mollis, ullamcorper dui quis, pretium lacus. Fusce vitae rutrum diam. Ut a odio tortor. Vestibulum non tincidunt est. Etiam sit amet auctor est.\ toprule %hline %addlinespace
bottomrule
1954--1960 & Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur varius et ex ut efficitur. Phasellus quis commodo diam. Nulla eu aliquet mauris. Nunc dapibus nisi ac lorem pretium aliquet. Sed posuere semper augue vel lacinia. Duis neque diam, ullamcorper in aliquam in, posuere id enim. Cras dui nulla, iaculis quis mauris in, vestibulum maximus nulla. Nulla et enim mollis, ullamcorper dui quis, pretium lacus. Fusce vitae rutrum diam. Ut a odio tortor. Vestibulum non tincidunt est. Etiam sit amet auctor est.\ hline addlinespace
1954--1960 & Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur varius et ex ut efficitur. Phasellus quis commodo diam. Nulla eu aliquet mauris. Nunc dapibus nisi ac lorem pretium aliquet. Sed posuere semper augue vel lacinia. Duis neque diam, ullamcorper in aliquam in, posuere id enim. Cras dui nulla, iaculis quis mauris in, vestibulum maximus nulla. Nulla et enim mollis, ullamcorper dui quis, pretium lacus. Fusce vitae rutrum diam. Ut a odio tortor. Vestibulum non tincidunt est. Etiam sit amet auctor est.\ hline addlinespace
bottomrule
end{tabularx}
label{tab:res}%
end{table}

end{document}


Yielding:
enter image description here



Which also spreads the words. Any suggestions on how to prevent the spreading of those words, whilst keeping the same words per line, with the fixed column width and the same word breaks would be much appreciated!










share|improve this question














bumped to the homepage by Community 5 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 2




    How to create fixed width table columns with text raggedright/centered/raggedleft? and How to avoid justified text in tabularx? should give you an idea on how to achieve raggedright text in p and X type columns.
    – leandriis
    Sep 13 at 14:15










  • @leandriis Thank you very much! I was unable to figure it out after 12 attempts, and did apparently not know the right search terms.
    – a.t.
    Sep 13 at 14:31















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am trying to get a text left aligned in a table that automatically wraps text at a specified, varying column width.
Without: LaTex adding extra spaces between words to reach the other side (right side) of the column.



My 2 main approaches consist of using the tabular and tabularx environment but both approaches end up spreading the words out from left to right except for the last line.



An example of the desired output:
Excel does not add the extra spaces in a left alignment with a wrapped text



MWE Tabular environment:



documentclass{article}
usepackage[utf8]{inputenc}

begin{document}


section{Introduction}
test
begin{table}
%begin{tabular}{|l|l|l|l|l|l|l|}
hspace*{-11.50em}
begin{tabular}{|p{3cm}|p{3cm}|p{2.5cm}|p{2cm}|p{2.cm}|p{2.cm}|p{2.cm}|}
hline
Week2Lecture2 ANN: Perceptrons, MLP and Backpropagation & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 9. 5.a. Notation & & & \ hline
W2L3 ANN: Training and building MLPs & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 12. 5.d Gradient descent & 13. 5.e Training Neural Networks & 10. 5.b. Model Architecture & 11. 5.c Loss Function \ hline
W3L4 Reinforcement Learning & 4. 2.a. Reinforcement Learning & & & & & \ hline
W3L5 Genetic Algorithms & 3. 1.c Evolutionairy Computing & 5. 3.a. Evolutionairy computing & & & & \ hline
W4L6 Swarm Intelligence & 6. 3.b. Swarm Intelligence & & & & & \ hline
W4L7 CI Math and Principles Overview & 9. 5.a. Notation & 7. 3.c Bayesian Reasoning & & & & \ hline
W5L8 ANN: Unsupervised & 2. 1.b. Neural Networks UnSupervised & & & & & \ hline
W5L9 ANN: Deep/Recurrent and Gradient Descent & 12. 5.d Gradient descent & 4. 2.a. Reinforcement Learning & 11. 5.c Loss Function & & & \ hline
W6L10 Evolutionary Strategies, Genetic Programming & 5. 3.a. Evolutionairy computing & 3. 1.c Evolutionairy Computing & & & & \ hline
W6L11 Mixed CI strategies & All & & & & & \ hline
W6L12 (Werkcollege) Swarm routing & 6. 3.b. Swarm Intelligence & & & & & \ hline
end{tabular}
end{table}
end{document}


Yielding:
This is the compilation of the tabular approach
As you can see, for example the words "Perceptrons, MLP" in cell 1,1 get stretched out.



MWE Tabularx environment:



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tabularx}
usepackage{booktabs}
usepackage{caption}

begin{document}


section{Introduction}
test


begin{table}[htbp]
caption{attempt 11 fix column width}
hspace*{-13.2em}
%begin{tabularx}{1.7columnwidth}{@{}|l|X@{}|}
begin{tabularx}{1.6columnwidth}{|p{3cm}|p{3cm}|}
toprule
multicolumn{1}{c}{years} & multicolumn{1}{c}{description} \
midrule
hline
1954--1960 & Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur varius et ex ut efficitur. Phasellus quis commodo diam. Nulla eu aliquet mauris. Nunc dapibus nisi ac lorem pretium aliquet. Sed posuere semper augue vel lacinia. Duis neque diam, ullamcorper in aliquam in, posuere id enim. Cras dui nulla, iaculis quis mauris in, vestibulum maximus nulla. Nulla et enim mollis, ullamcorper dui quis, pretium lacus. Fusce vitae rutrum diam. Ut a odio tortor. Vestibulum non tincidunt est. Etiam sit amet auctor est.\ toprule %hline %addlinespace
bottomrule
1954--1960 & Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur varius et ex ut efficitur. Phasellus quis commodo diam. Nulla eu aliquet mauris. Nunc dapibus nisi ac lorem pretium aliquet. Sed posuere semper augue vel lacinia. Duis neque diam, ullamcorper in aliquam in, posuere id enim. Cras dui nulla, iaculis quis mauris in, vestibulum maximus nulla. Nulla et enim mollis, ullamcorper dui quis, pretium lacus. Fusce vitae rutrum diam. Ut a odio tortor. Vestibulum non tincidunt est. Etiam sit amet auctor est.\ hline addlinespace
1954--1960 & Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur varius et ex ut efficitur. Phasellus quis commodo diam. Nulla eu aliquet mauris. Nunc dapibus nisi ac lorem pretium aliquet. Sed posuere semper augue vel lacinia. Duis neque diam, ullamcorper in aliquam in, posuere id enim. Cras dui nulla, iaculis quis mauris in, vestibulum maximus nulla. Nulla et enim mollis, ullamcorper dui quis, pretium lacus. Fusce vitae rutrum diam. Ut a odio tortor. Vestibulum non tincidunt est. Etiam sit amet auctor est.\ hline addlinespace
bottomrule
end{tabularx}
label{tab:res}%
end{table}

end{document}


Yielding:
enter image description here



Which also spreads the words. Any suggestions on how to prevent the spreading of those words, whilst keeping the same words per line, with the fixed column width and the same word breaks would be much appreciated!










share|improve this question













I am trying to get a text left aligned in a table that automatically wraps text at a specified, varying column width.
Without: LaTex adding extra spaces between words to reach the other side (right side) of the column.



My 2 main approaches consist of using the tabular and tabularx environment but both approaches end up spreading the words out from left to right except for the last line.



An example of the desired output:
Excel does not add the extra spaces in a left alignment with a wrapped text



MWE Tabular environment:



documentclass{article}
usepackage[utf8]{inputenc}

begin{document}


section{Introduction}
test
begin{table}
%begin{tabular}{|l|l|l|l|l|l|l|}
hspace*{-11.50em}
begin{tabular}{|p{3cm}|p{3cm}|p{2.5cm}|p{2cm}|p{2.cm}|p{2.cm}|p{2.cm}|}
hline
Week2Lecture2 ANN: Perceptrons, MLP and Backpropagation & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 9. 5.a. Notation & & & \ hline
W2L3 ANN: Training and building MLPs & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 12. 5.d Gradient descent & 13. 5.e Training Neural Networks & 10. 5.b. Model Architecture & 11. 5.c Loss Function \ hline
W3L4 Reinforcement Learning & 4. 2.a. Reinforcement Learning & & & & & \ hline
W3L5 Genetic Algorithms & 3. 1.c Evolutionairy Computing & 5. 3.a. Evolutionairy computing & & & & \ hline
W4L6 Swarm Intelligence & 6. 3.b. Swarm Intelligence & & & & & \ hline
W4L7 CI Math and Principles Overview & 9. 5.a. Notation & 7. 3.c Bayesian Reasoning & & & & \ hline
W5L8 ANN: Unsupervised & 2. 1.b. Neural Networks UnSupervised & & & & & \ hline
W5L9 ANN: Deep/Recurrent and Gradient Descent & 12. 5.d Gradient descent & 4. 2.a. Reinforcement Learning & 11. 5.c Loss Function & & & \ hline
W6L10 Evolutionary Strategies, Genetic Programming & 5. 3.a. Evolutionairy computing & 3. 1.c Evolutionairy Computing & & & & \ hline
W6L11 Mixed CI strategies & All & & & & & \ hline
W6L12 (Werkcollege) Swarm routing & 6. 3.b. Swarm Intelligence & & & & & \ hline
end{tabular}
end{table}
end{document}


Yielding:
This is the compilation of the tabular approach
As you can see, for example the words "Perceptrons, MLP" in cell 1,1 get stretched out.



MWE Tabularx environment:



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tabularx}
usepackage{booktabs}
usepackage{caption}

begin{document}


section{Introduction}
test


begin{table}[htbp]
caption{attempt 11 fix column width}
hspace*{-13.2em}
%begin{tabularx}{1.7columnwidth}{@{}|l|X@{}|}
begin{tabularx}{1.6columnwidth}{|p{3cm}|p{3cm}|}
toprule
multicolumn{1}{c}{years} & multicolumn{1}{c}{description} \
midrule
hline
1954--1960 & Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur varius et ex ut efficitur. Phasellus quis commodo diam. Nulla eu aliquet mauris. Nunc dapibus nisi ac lorem pretium aliquet. Sed posuere semper augue vel lacinia. Duis neque diam, ullamcorper in aliquam in, posuere id enim. Cras dui nulla, iaculis quis mauris in, vestibulum maximus nulla. Nulla et enim mollis, ullamcorper dui quis, pretium lacus. Fusce vitae rutrum diam. Ut a odio tortor. Vestibulum non tincidunt est. Etiam sit amet auctor est.\ toprule %hline %addlinespace
bottomrule
1954--1960 & Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur varius et ex ut efficitur. Phasellus quis commodo diam. Nulla eu aliquet mauris. Nunc dapibus nisi ac lorem pretium aliquet. Sed posuere semper augue vel lacinia. Duis neque diam, ullamcorper in aliquam in, posuere id enim. Cras dui nulla, iaculis quis mauris in, vestibulum maximus nulla. Nulla et enim mollis, ullamcorper dui quis, pretium lacus. Fusce vitae rutrum diam. Ut a odio tortor. Vestibulum non tincidunt est. Etiam sit amet auctor est.\ hline addlinespace
1954--1960 & Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur varius et ex ut efficitur. Phasellus quis commodo diam. Nulla eu aliquet mauris. Nunc dapibus nisi ac lorem pretium aliquet. Sed posuere semper augue vel lacinia. Duis neque diam, ullamcorper in aliquam in, posuere id enim. Cras dui nulla, iaculis quis mauris in, vestibulum maximus nulla. Nulla et enim mollis, ullamcorper dui quis, pretium lacus. Fusce vitae rutrum diam. Ut a odio tortor. Vestibulum non tincidunt est. Etiam sit amet auctor est.\ hline addlinespace
bottomrule
end{tabularx}
label{tab:res}%
end{table}

end{document}


Yielding:
enter image description here



Which also spreads the words. Any suggestions on how to prevent the spreading of those words, whilst keeping the same words per line, with the fixed column width and the same word breaks would be much appreciated!







tables horizontal-alignment column-width






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 13 at 13:47









a.t.

1135




1135





bumped to the homepage by Community 5 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 5 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 2




    How to create fixed width table columns with text raggedright/centered/raggedleft? and How to avoid justified text in tabularx? should give you an idea on how to achieve raggedright text in p and X type columns.
    – leandriis
    Sep 13 at 14:15










  • @leandriis Thank you very much! I was unable to figure it out after 12 attempts, and did apparently not know the right search terms.
    – a.t.
    Sep 13 at 14:31
















  • 2




    How to create fixed width table columns with text raggedright/centered/raggedleft? and How to avoid justified text in tabularx? should give you an idea on how to achieve raggedright text in p and X type columns.
    – leandriis
    Sep 13 at 14:15










  • @leandriis Thank you very much! I was unable to figure it out after 12 attempts, and did apparently not know the right search terms.
    – a.t.
    Sep 13 at 14:31










2




2




How to create fixed width table columns with text raggedright/centered/raggedleft? and How to avoid justified text in tabularx? should give you an idea on how to achieve raggedright text in p and X type columns.
– leandriis
Sep 13 at 14:15




How to create fixed width table columns with text raggedright/centered/raggedleft? and How to avoid justified text in tabularx? should give you an idea on how to achieve raggedright text in p and X type columns.
– leandriis
Sep 13 at 14:15












@leandriis Thank you very much! I was unable to figure it out after 12 attempts, and did apparently not know the right search terms.
– a.t.
Sep 13 at 14:31






@leandriis Thank you very much! I was unable to figure it out after 12 attempts, and did apparently not know the right search terms.
– a.t.
Sep 13 at 14:31












1 Answer
1






active

oldest

votes

















up vote
0
down vote













Indead as @leandriis indicated, the solution was explained in the first link. For completeness applied to this problem it becomes:



documentclass{article}

usepackage{array}
newcolumntype{L}[1]{>{raggedrightletnewline\arraybackslashhspace{0pt}}m{#1}}
newcolumntype{C}[1]{>{centeringletnewline\arraybackslashhspace{0pt}}m{#1}}
newcolumntype{R}[1]{>{raggedleftletnewline\arraybackslashhspace{0pt}}m{#1}}

begin{document}




section{Introduction}
test
begin{table}
%begin{tabular}{|l|l|l|l|l|l|l|}
hspace*{-11.50em}
%begin{tabular}{|p{3cm}|p{3cm}|p{2.5cm}|p{2cm}|p{2.cm}|p{2.cm}|p{2.cm}|}
begin{tabular}{| L{3cm} |L{3cm}|L{2.5cm}|L{2cm}|L{2.cm}|L{2.cm}|L{2.cm}|}
hline
Week2Lecture2 ANN: Perceptrons, MLP and Backpropagation & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 9. 5.a. Notation & & & \ hline
W2L3 ANN: Training and building MLPs & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 12. 5.d Gradient descent & 13. 5.e Training Neural Networks & 10. 5.b. Model Architecture & 11. 5.c Loss Function \ hline
W3L4 Reinforcement Learning & 4. 2.a. Reinforcement Learning & & & & & \ hline
W3L5 Genetic Algorithms & 3. 1.c Evolutionairy Computing & 5. 3.a. Evolutionairy computing & & & & \ hline
W4L6 Swarm Intelligence & 6. 3.b. Swarm Intelligence & & & & & \ hline
W4L7 CI Math and Principles Overview & 9. 5.a. Notation & 7. 3.c Bayesian Reasoning & & & & \ hline
W5L8 ANN: Unsupervised & 2. 1.b. Neural Networks UnSupervised & & & & & \ hline
W5L9 ANN: Deep/Recurrent and Gradient Descent & 12. 5.d Gradient descent & 4. 2.a. Reinforcement Learning & 11. 5.c Loss Function & & & \ hline
W6L10 Evolutionary Strategies, Genetic Programming & 5. 3.a. Evolutionairy computing & 3. 1.c Evolutionairy Computing & & & & \ hline
W6L11 Mixed CI strategies & All & & & & & \ hline
W6L12 (Werkcollege) Swarm routing & 6. 3.b. Swarm Intelligence & & & & & \ hline
end{tabular}
end{table}

end{document}


Yielding:



enter image description here



The essence was in the line:



begin{tabular}{|p{3cm}|p{3cm}|p{2.5cm}|p{2cm}|p{2.cm}|p{2.cm}|p{2.cm}|}


Which had to change to:



begin{tabular}{| L{3cm} |L{3cm}|L{2.5cm}|L{2cm}|L{2.cm}|L{2.cm}|L{2.cm}|}


Whilst adding the described new column types and array package.






share|improve this answer

















  • 2




    If one wants to allow for some hyphenation (whenever possible), one can load ragged2e and code newcolumntype{L}[1]{>{RaggedRightarraybackslashhspace{0pt}}m{#1}}.
    – Bernard
    Sep 13 at 17:32











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


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f450724%2fprevent-spreading-of-words-in-left-aligned-automatically-wrapped-text-in-a-ta%23new-answer', 'question_page');
}
);

Post as a guest
































1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Indead as @leandriis indicated, the solution was explained in the first link. For completeness applied to this problem it becomes:



documentclass{article}

usepackage{array}
newcolumntype{L}[1]{>{raggedrightletnewline\arraybackslashhspace{0pt}}m{#1}}
newcolumntype{C}[1]{>{centeringletnewline\arraybackslashhspace{0pt}}m{#1}}
newcolumntype{R}[1]{>{raggedleftletnewline\arraybackslashhspace{0pt}}m{#1}}

begin{document}




section{Introduction}
test
begin{table}
%begin{tabular}{|l|l|l|l|l|l|l|}
hspace*{-11.50em}
%begin{tabular}{|p{3cm}|p{3cm}|p{2.5cm}|p{2cm}|p{2.cm}|p{2.cm}|p{2.cm}|}
begin{tabular}{| L{3cm} |L{3cm}|L{2.5cm}|L{2cm}|L{2.cm}|L{2.cm}|L{2.cm}|}
hline
Week2Lecture2 ANN: Perceptrons, MLP and Backpropagation & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 9. 5.a. Notation & & & \ hline
W2L3 ANN: Training and building MLPs & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 12. 5.d Gradient descent & 13. 5.e Training Neural Networks & 10. 5.b. Model Architecture & 11. 5.c Loss Function \ hline
W3L4 Reinforcement Learning & 4. 2.a. Reinforcement Learning & & & & & \ hline
W3L5 Genetic Algorithms & 3. 1.c Evolutionairy Computing & 5. 3.a. Evolutionairy computing & & & & \ hline
W4L6 Swarm Intelligence & 6. 3.b. Swarm Intelligence & & & & & \ hline
W4L7 CI Math and Principles Overview & 9. 5.a. Notation & 7. 3.c Bayesian Reasoning & & & & \ hline
W5L8 ANN: Unsupervised & 2. 1.b. Neural Networks UnSupervised & & & & & \ hline
W5L9 ANN: Deep/Recurrent and Gradient Descent & 12. 5.d Gradient descent & 4. 2.a. Reinforcement Learning & 11. 5.c Loss Function & & & \ hline
W6L10 Evolutionary Strategies, Genetic Programming & 5. 3.a. Evolutionairy computing & 3. 1.c Evolutionairy Computing & & & & \ hline
W6L11 Mixed CI strategies & All & & & & & \ hline
W6L12 (Werkcollege) Swarm routing & 6. 3.b. Swarm Intelligence & & & & & \ hline
end{tabular}
end{table}

end{document}


Yielding:



enter image description here



The essence was in the line:



begin{tabular}{|p{3cm}|p{3cm}|p{2.5cm}|p{2cm}|p{2.cm}|p{2.cm}|p{2.cm}|}


Which had to change to:



begin{tabular}{| L{3cm} |L{3cm}|L{2.5cm}|L{2cm}|L{2.cm}|L{2.cm}|L{2.cm}|}


Whilst adding the described new column types and array package.






share|improve this answer

















  • 2




    If one wants to allow for some hyphenation (whenever possible), one can load ragged2e and code newcolumntype{L}[1]{>{RaggedRightarraybackslashhspace{0pt}}m{#1}}.
    – Bernard
    Sep 13 at 17:32















up vote
0
down vote













Indead as @leandriis indicated, the solution was explained in the first link. For completeness applied to this problem it becomes:



documentclass{article}

usepackage{array}
newcolumntype{L}[1]{>{raggedrightletnewline\arraybackslashhspace{0pt}}m{#1}}
newcolumntype{C}[1]{>{centeringletnewline\arraybackslashhspace{0pt}}m{#1}}
newcolumntype{R}[1]{>{raggedleftletnewline\arraybackslashhspace{0pt}}m{#1}}

begin{document}




section{Introduction}
test
begin{table}
%begin{tabular}{|l|l|l|l|l|l|l|}
hspace*{-11.50em}
%begin{tabular}{|p{3cm}|p{3cm}|p{2.5cm}|p{2cm}|p{2.cm}|p{2.cm}|p{2.cm}|}
begin{tabular}{| L{3cm} |L{3cm}|L{2.5cm}|L{2cm}|L{2.cm}|L{2.cm}|L{2.cm}|}
hline
Week2Lecture2 ANN: Perceptrons, MLP and Backpropagation & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 9. 5.a. Notation & & & \ hline
W2L3 ANN: Training and building MLPs & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 12. 5.d Gradient descent & 13. 5.e Training Neural Networks & 10. 5.b. Model Architecture & 11. 5.c Loss Function \ hline
W3L4 Reinforcement Learning & 4. 2.a. Reinforcement Learning & & & & & \ hline
W3L5 Genetic Algorithms & 3. 1.c Evolutionairy Computing & 5. 3.a. Evolutionairy computing & & & & \ hline
W4L6 Swarm Intelligence & 6. 3.b. Swarm Intelligence & & & & & \ hline
W4L7 CI Math and Principles Overview & 9. 5.a. Notation & 7. 3.c Bayesian Reasoning & & & & \ hline
W5L8 ANN: Unsupervised & 2. 1.b. Neural Networks UnSupervised & & & & & \ hline
W5L9 ANN: Deep/Recurrent and Gradient Descent & 12. 5.d Gradient descent & 4. 2.a. Reinforcement Learning & 11. 5.c Loss Function & & & \ hline
W6L10 Evolutionary Strategies, Genetic Programming & 5. 3.a. Evolutionairy computing & 3. 1.c Evolutionairy Computing & & & & \ hline
W6L11 Mixed CI strategies & All & & & & & \ hline
W6L12 (Werkcollege) Swarm routing & 6. 3.b. Swarm Intelligence & & & & & \ hline
end{tabular}
end{table}

end{document}


Yielding:



enter image description here



The essence was in the line:



begin{tabular}{|p{3cm}|p{3cm}|p{2.5cm}|p{2cm}|p{2.cm}|p{2.cm}|p{2.cm}|}


Which had to change to:



begin{tabular}{| L{3cm} |L{3cm}|L{2.5cm}|L{2cm}|L{2.cm}|L{2.cm}|L{2.cm}|}


Whilst adding the described new column types and array package.






share|improve this answer

















  • 2




    If one wants to allow for some hyphenation (whenever possible), one can load ragged2e and code newcolumntype{L}[1]{>{RaggedRightarraybackslashhspace{0pt}}m{#1}}.
    – Bernard
    Sep 13 at 17:32













up vote
0
down vote










up vote
0
down vote









Indead as @leandriis indicated, the solution was explained in the first link. For completeness applied to this problem it becomes:



documentclass{article}

usepackage{array}
newcolumntype{L}[1]{>{raggedrightletnewline\arraybackslashhspace{0pt}}m{#1}}
newcolumntype{C}[1]{>{centeringletnewline\arraybackslashhspace{0pt}}m{#1}}
newcolumntype{R}[1]{>{raggedleftletnewline\arraybackslashhspace{0pt}}m{#1}}

begin{document}




section{Introduction}
test
begin{table}
%begin{tabular}{|l|l|l|l|l|l|l|}
hspace*{-11.50em}
%begin{tabular}{|p{3cm}|p{3cm}|p{2.5cm}|p{2cm}|p{2.cm}|p{2.cm}|p{2.cm}|}
begin{tabular}{| L{3cm} |L{3cm}|L{2.5cm}|L{2cm}|L{2.cm}|L{2.cm}|L{2.cm}|}
hline
Week2Lecture2 ANN: Perceptrons, MLP and Backpropagation & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 9. 5.a. Notation & & & \ hline
W2L3 ANN: Training and building MLPs & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 12. 5.d Gradient descent & 13. 5.e Training Neural Networks & 10. 5.b. Model Architecture & 11. 5.c Loss Function \ hline
W3L4 Reinforcement Learning & 4. 2.a. Reinforcement Learning & & & & & \ hline
W3L5 Genetic Algorithms & 3. 1.c Evolutionairy Computing & 5. 3.a. Evolutionairy computing & & & & \ hline
W4L6 Swarm Intelligence & 6. 3.b. Swarm Intelligence & & & & & \ hline
W4L7 CI Math and Principles Overview & 9. 5.a. Notation & 7. 3.c Bayesian Reasoning & & & & \ hline
W5L8 ANN: Unsupervised & 2. 1.b. Neural Networks UnSupervised & & & & & \ hline
W5L9 ANN: Deep/Recurrent and Gradient Descent & 12. 5.d Gradient descent & 4. 2.a. Reinforcement Learning & 11. 5.c Loss Function & & & \ hline
W6L10 Evolutionary Strategies, Genetic Programming & 5. 3.a. Evolutionairy computing & 3. 1.c Evolutionairy Computing & & & & \ hline
W6L11 Mixed CI strategies & All & & & & & \ hline
W6L12 (Werkcollege) Swarm routing & 6. 3.b. Swarm Intelligence & & & & & \ hline
end{tabular}
end{table}

end{document}


Yielding:



enter image description here



The essence was in the line:



begin{tabular}{|p{3cm}|p{3cm}|p{2.5cm}|p{2cm}|p{2.cm}|p{2.cm}|p{2.cm}|}


Which had to change to:



begin{tabular}{| L{3cm} |L{3cm}|L{2.5cm}|L{2cm}|L{2.cm}|L{2.cm}|L{2.cm}|}


Whilst adding the described new column types and array package.






share|improve this answer












Indead as @leandriis indicated, the solution was explained in the first link. For completeness applied to this problem it becomes:



documentclass{article}

usepackage{array}
newcolumntype{L}[1]{>{raggedrightletnewline\arraybackslashhspace{0pt}}m{#1}}
newcolumntype{C}[1]{>{centeringletnewline\arraybackslashhspace{0pt}}m{#1}}
newcolumntype{R}[1]{>{raggedleftletnewline\arraybackslashhspace{0pt}}m{#1}}

begin{document}




section{Introduction}
test
begin{table}
%begin{tabular}{|l|l|l|l|l|l|l|}
hspace*{-11.50em}
%begin{tabular}{|p{3cm}|p{3cm}|p{2.5cm}|p{2cm}|p{2.cm}|p{2.cm}|p{2.cm}|}
begin{tabular}{| L{3cm} |L{3cm}|L{2.5cm}|L{2cm}|L{2.cm}|L{2.cm}|L{2.cm}|}
hline
Week2Lecture2 ANN: Perceptrons, MLP and Backpropagation & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 9. 5.a. Notation & & & \ hline
W2L3 ANN: Training and building MLPs & 1. 1.a. Neural Networks Supervised & 2. 1.b. Neural Networks UnSupervised & 12. 5.d Gradient descent & 13. 5.e Training Neural Networks & 10. 5.b. Model Architecture & 11. 5.c Loss Function \ hline
W3L4 Reinforcement Learning & 4. 2.a. Reinforcement Learning & & & & & \ hline
W3L5 Genetic Algorithms & 3. 1.c Evolutionairy Computing & 5. 3.a. Evolutionairy computing & & & & \ hline
W4L6 Swarm Intelligence & 6. 3.b. Swarm Intelligence & & & & & \ hline
W4L7 CI Math and Principles Overview & 9. 5.a. Notation & 7. 3.c Bayesian Reasoning & & & & \ hline
W5L8 ANN: Unsupervised & 2. 1.b. Neural Networks UnSupervised & & & & & \ hline
W5L9 ANN: Deep/Recurrent and Gradient Descent & 12. 5.d Gradient descent & 4. 2.a. Reinforcement Learning & 11. 5.c Loss Function & & & \ hline
W6L10 Evolutionary Strategies, Genetic Programming & 5. 3.a. Evolutionairy computing & 3. 1.c Evolutionairy Computing & & & & \ hline
W6L11 Mixed CI strategies & All & & & & & \ hline
W6L12 (Werkcollege) Swarm routing & 6. 3.b. Swarm Intelligence & & & & & \ hline
end{tabular}
end{table}

end{document}


Yielding:



enter image description here



The essence was in the line:



begin{tabular}{|p{3cm}|p{3cm}|p{2.5cm}|p{2cm}|p{2.cm}|p{2.cm}|p{2.cm}|}


Which had to change to:



begin{tabular}{| L{3cm} |L{3cm}|L{2.5cm}|L{2cm}|L{2.cm}|L{2.cm}|L{2.cm}|}


Whilst adding the described new column types and array package.







share|improve this answer












share|improve this answer



share|improve this answer










answered Sep 13 at 14:31









a.t.

1135




1135








  • 2




    If one wants to allow for some hyphenation (whenever possible), one can load ragged2e and code newcolumntype{L}[1]{>{RaggedRightarraybackslashhspace{0pt}}m{#1}}.
    – Bernard
    Sep 13 at 17:32














  • 2




    If one wants to allow for some hyphenation (whenever possible), one can load ragged2e and code newcolumntype{L}[1]{>{RaggedRightarraybackslashhspace{0pt}}m{#1}}.
    – Bernard
    Sep 13 at 17:32








2




2




If one wants to allow for some hyphenation (whenever possible), one can load ragged2e and code newcolumntype{L}[1]{>{RaggedRightarraybackslashhspace{0pt}}m{#1}}.
– Bernard
Sep 13 at 17:32




If one wants to allow for some hyphenation (whenever possible), one can load ragged2e and code newcolumntype{L}[1]{>{RaggedRightarraybackslashhspace{0pt}}m{#1}}.
– Bernard
Sep 13 at 17:32


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f450724%2fprevent-spreading-of-words-in-left-aligned-automatically-wrapped-text-in-a-ta%23new-answer', 'question_page');
}
);

Post as a guest




















































































Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Can I use Tabulator js library in my java Spring + Thymeleaf project?