Using Tabularx with very simple multirow table, I get text overlap











up vote
1
down vote

favorite












I have this very simple table code. I initially didnt use tabularx, but then the table would run off the right side of the page. So instead i used tabularx. Now, the text within a box seems to overlap with other text, check the photo below.



begin{center}
begin{tabularx}{textwidth}{|X|X|X|X|X|X|X|X|X|X|X|X|}
hline
n1 & n8 & n3 & n10 & n5 & n12 & n7 & n2 & n9 & n4 & n11 & n6 \
hline
1/1 & 2187/2048 & 9/8 & 19683/16384 & 81/64 & 4/3 & 729/512 &
3/2 & 6561/4096 & 27/16 & 59049/32768 & 243/128 \
hline
end{tabularx}
end{center}


enter image description here



How could i fix this?



The full page is found below



documentclass[12pt]{article}
usepackage[margin=1in]{geometry}
usepackage{amsmath,amsthm,amssymb,amsfonts}
usepackage[shortlabels]{enumitem}
usepackage{graphicx}
usepackage{tabularx}

newcommand{NN}{mathbb{N}}
newcommand{ZZ}{mathbb{Z}}

newenvironment{problem}[2][Problem]{begin{trivlist}
item[hskip labelsep {bfseries #1}hskip labelsep {bfseries #2.}]}{end{trivlist}}
%If you want to title your bold things something different just make another thing exactly like this but replace "problem" with the name of the thing you want, like theorem or lemma or whatever

begin{document}

%renewcommand{qedsymbol}{filledbox}
%Good resources for looking up how to do stuff:
%Binary operators: http://www.access2science.com/latex/Binary.html
%General help: http://en.wikibooks.org/wiki/LaTeX/Mathematics
%Or just google stuff

title{Homework #1}
author{Mataan Peer}
maketitle

begin{problem}{2.4}
Give a visual, geometric proof of the fact mentioned in the text
(using ideas similar to those in Figures 2.2 and 2.3) that $8*t_n + 1$ is a
square by showing in a diagram how eight triangular arrays of stones
together with one extra stone can be arranged into a square array of
stones.
end{problem}
begin{proof}
includegraphics[width=4in]{Triangular_Numbers.jpeg}
end{proof}

begin{problem}{2.12}
In addition to square and triangular numbers Nicomachus also
discussed other numbers with geometric qualities. The $pentagonal$
numbers are the numbers
$$1, 5, 12, 22, 35, ...$$
and the hexagonal numbers are the numbers
$$1, 6, 15, 28, 45, ...$$
that represent ever larger patterns of pentagons and hexagons,
respectively, analogous to the pattern of triangles shown in
Figure 2.1.
begin{enumerate}[a]
item Draw the patterns of pentagons and hexagons that produce the
first five pentagonal numbers, and the first five hexagonal
numbers.
item Note that we can write a pentagonal number such as 35 using a
sum of the differences between successive pentagonal numbers:
$$35 = 1 + 4 + 7 + 10 + 13.$$
We can do the same thing for hexagonal numbers:
$$45 = 1 + 5 + 9 + 13 + 17.$$
By the way, it should be easy for you to see what these differences
represent in the patterns you drew in part (a).

Write a formula for the $n$th pentagonal number $p_n$ using a
sum of the differences between the first $n$ pentagonal numbers.
Your formula should look a lot like the formula we know for the
$n$th square number: $1 + 3 + 5 +dots+ (2n-1$).
item Write a formula for the $n$th hexagonal number $h_n$ using a sum of
the differences between the first $n$ hexagonal numbers.
item Find closed formulas for $p_n$ and $h_n$; that is, find formulas similar
to the formula $t_n = frac{n(n+1)}{2}$. Then use induction to verify these
formulas. For the induction step you will need your formulas
from parts (b) and (c).
end{enumerate}

Nicomachus extended this idea and also considered septagonal and
octagonal numbers for which there are similar patterns and formulas.
end{problem}
begin{proof}[Answer for a]
includegraphics[angle=-90,width=4in]{Hexagonal and Pentagonal.jpg}
phantomqedhere
end{proof}
begin{proof}[Answer for b]
phantomqedhere
$$p_n = 1+4+7+dots+(3n-2)$$
end{proof}
begin{proof}[Answer for c]
phantomqedhere
$$h_n = 1+5+9+dots+(4n-3)$$
end{proof}
begin{proof}[Answer for first part of d]
$$p_n = frac{3n^2-n}{2}$$
$$h_n = 2n^2 -n $$

end{proof}
begin{proof}[Proof By Induction Pentagon]
For the base case we show that the left hand side and the right hand side for $n = 1$ are equivalent. The left hand side is $p_1$ which is 1. The right hand side would be $frac{3*1^2 -1}{2} $ which is equivalent to 1.

Next we make the inductive hypothesis that the formula $$p_n = frac{3n^2-n}{2}$$ is true for n. Now we must show that it is also true for $n+1$
begin{align*}
p_{n+1} &= 1+4+7+dots+(3(n+1)-2)\
&=p_n+3(n+1)-2\
&= frac{3n^2 -n}{2} + 3n+1\
&= frac{3n^2 -n +6n +2}{2}\
&= frac{3n^2+5n+2}{2}\
&= frac{(3n^2+5n+2 +(n+1))+n+1}{2}\
&= frac{3n^2 +6n+3 -(n+1)}{2}\
&= frac{3(n+1)^2 -(n+1)}{2}
end{align*}
Thus we show that the formula is true for $n+1$.

By induction we conclude that the formula is true for all $n$
end{proof}

begin{proof}[Proof By Induction Hexagon]
For the base case we show that left hand side and the right hand side for $n=1$ are equivalent. The left hand side is $h_1$ which is 1. The right hand side is $2*1^2 - 1 = 1$. The two sides are equal and thus the equation is true for $n = 1$.

Next we make the inductive hypothesis that the formula $$h_n = 2n^2 -n$$ is true for n. Now we must show that it is also true for $n+1$.
begin{align*}
h_{n+1} &= 1 + 5 + 9+dots+4(n+1)-3\
&= h_n + 4n+1\
&= 2n^2 -n +4n+1\
&= 2n^2 +3n +1\
&= (2n^2+3n+1 + n+1) -(n+1)\
&= 2n^2 +4n +2 - (n+1)\
&=2(n+1)^2 - (n+1)
end{align*}
So the formula is true for $n+1$.

By induction we conclude that is also true for all n.
end{proof}
begin{problem}{2.16}
Give an alternative proof for Theorem 2.1 by assuming there is a largest
prime $p$ and considering the number $N = p! + 1$.
end{problem}
begin{proof}
Assume there is a largest prime $p$. Now consider the number $N$ where$$N= p!+1.$$
By definition
begin{align*}
p! &= 1*2*3*dots*(p-1)*(p) \ &and\
N &= 1*2*3*dots*(p-1)*(p)+1
end{align*}
By the definition of divisibility $p!$ is divisible by every number between 1 and $p$ inclusive. Also, since $p$ is the largest prime, all primes are included in the list of 1 to $p$. This also means that $N$ is not divisible by any of those numbers except for 1. However $N$ must be able to factor into primes. So there emerges a contradiction that $N$ has to be able to factor into primes that are not contained in the list 1 to $p$ so there must be a larger prime.

We conclude that there is no largest prime and thus infinite primes.
end{proof}

begin{problem}{2.21}
We saw in the text that if we wanted to have a thirteenth note that was
an F a perfect octave above the original F, then we had a slight problem
with our Pythagorean tuning. One way to deal with this problem is to
tune partway up the scale from the original F, and then tune down the
rest of the scale from this high F. (This doesn’t avoid the problem, of
course; it just moves it somewhere else.)
So, for example, the pitch ratio of that high F should be $frac{2}{1}$. Therefore,
if we tune down from this note to n12, we need to divide by $frac{3}{2}$, so the
pitch ratio for $n_{12}$ becomes $frac{4}{3}$ . Next, we could tune $n_{11}$, and so on. Of course, when tuning down, whenever a note falls below n1, you need to bring it back up an octave.

Use this minor variation in Pythagorean tuning to finish filling in
the pitch ratios for the twelve notes of the scale by working up the scale
for $n_1$,..., $n_9$, and then down the scale for $n_{12}$, $n_{11}$, $n_{10}$:
begin{center}
begin{tabularx}{textwidth}{|X|X|X|X|X|X|X|X|X|X|X|X|}
hline
n1 & n8 & n3 & n10 & n5 & n12 & n7 & n2 & n9 & n4 & n11 & n6 \
hline
1/1 & 2187/2048 & 9/8 & 19683/16384 & 81/64 & 4/3 & 729/512 & 3/2 & 6561/4096 & 27/16 & 59049/32768 & 243/128 \
hline
end{tabularx}
end{center}

end{problem}

end{document}









share|improve this question









New contributor




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




















  • Welcome to TeX SX! Could you post a complete code, so we know what paper size you use, whether you load geometry, &c.?
    – Bernard
    4 hours ago










  • @Bernard Done just updated
    – Mataan P
    3 hours ago










  • @Kurt So interestingly enough this worked very well, however one of the slashes bleeds into another box a little, but the answer below seems to work perfectly
    – Mataan P
    3 hours ago















up vote
1
down vote

favorite












I have this very simple table code. I initially didnt use tabularx, but then the table would run off the right side of the page. So instead i used tabularx. Now, the text within a box seems to overlap with other text, check the photo below.



begin{center}
begin{tabularx}{textwidth}{|X|X|X|X|X|X|X|X|X|X|X|X|}
hline
n1 & n8 & n3 & n10 & n5 & n12 & n7 & n2 & n9 & n4 & n11 & n6 \
hline
1/1 & 2187/2048 & 9/8 & 19683/16384 & 81/64 & 4/3 & 729/512 &
3/2 & 6561/4096 & 27/16 & 59049/32768 & 243/128 \
hline
end{tabularx}
end{center}


enter image description here



How could i fix this?



The full page is found below



documentclass[12pt]{article}
usepackage[margin=1in]{geometry}
usepackage{amsmath,amsthm,amssymb,amsfonts}
usepackage[shortlabels]{enumitem}
usepackage{graphicx}
usepackage{tabularx}

newcommand{NN}{mathbb{N}}
newcommand{ZZ}{mathbb{Z}}

newenvironment{problem}[2][Problem]{begin{trivlist}
item[hskip labelsep {bfseries #1}hskip labelsep {bfseries #2.}]}{end{trivlist}}
%If you want to title your bold things something different just make another thing exactly like this but replace "problem" with the name of the thing you want, like theorem or lemma or whatever

begin{document}

%renewcommand{qedsymbol}{filledbox}
%Good resources for looking up how to do stuff:
%Binary operators: http://www.access2science.com/latex/Binary.html
%General help: http://en.wikibooks.org/wiki/LaTeX/Mathematics
%Or just google stuff

title{Homework #1}
author{Mataan Peer}
maketitle

begin{problem}{2.4}
Give a visual, geometric proof of the fact mentioned in the text
(using ideas similar to those in Figures 2.2 and 2.3) that $8*t_n + 1$ is a
square by showing in a diagram how eight triangular arrays of stones
together with one extra stone can be arranged into a square array of
stones.
end{problem}
begin{proof}
includegraphics[width=4in]{Triangular_Numbers.jpeg}
end{proof}

begin{problem}{2.12}
In addition to square and triangular numbers Nicomachus also
discussed other numbers with geometric qualities. The $pentagonal$
numbers are the numbers
$$1, 5, 12, 22, 35, ...$$
and the hexagonal numbers are the numbers
$$1, 6, 15, 28, 45, ...$$
that represent ever larger patterns of pentagons and hexagons,
respectively, analogous to the pattern of triangles shown in
Figure 2.1.
begin{enumerate}[a]
item Draw the patterns of pentagons and hexagons that produce the
first five pentagonal numbers, and the first five hexagonal
numbers.
item Note that we can write a pentagonal number such as 35 using a
sum of the differences between successive pentagonal numbers:
$$35 = 1 + 4 + 7 + 10 + 13.$$
We can do the same thing for hexagonal numbers:
$$45 = 1 + 5 + 9 + 13 + 17.$$
By the way, it should be easy for you to see what these differences
represent in the patterns you drew in part (a).

Write a formula for the $n$th pentagonal number $p_n$ using a
sum of the differences between the first $n$ pentagonal numbers.
Your formula should look a lot like the formula we know for the
$n$th square number: $1 + 3 + 5 +dots+ (2n-1$).
item Write a formula for the $n$th hexagonal number $h_n$ using a sum of
the differences between the first $n$ hexagonal numbers.
item Find closed formulas for $p_n$ and $h_n$; that is, find formulas similar
to the formula $t_n = frac{n(n+1)}{2}$. Then use induction to verify these
formulas. For the induction step you will need your formulas
from parts (b) and (c).
end{enumerate}

Nicomachus extended this idea and also considered septagonal and
octagonal numbers for which there are similar patterns and formulas.
end{problem}
begin{proof}[Answer for a]
includegraphics[angle=-90,width=4in]{Hexagonal and Pentagonal.jpg}
phantomqedhere
end{proof}
begin{proof}[Answer for b]
phantomqedhere
$$p_n = 1+4+7+dots+(3n-2)$$
end{proof}
begin{proof}[Answer for c]
phantomqedhere
$$h_n = 1+5+9+dots+(4n-3)$$
end{proof}
begin{proof}[Answer for first part of d]
$$p_n = frac{3n^2-n}{2}$$
$$h_n = 2n^2 -n $$

end{proof}
begin{proof}[Proof By Induction Pentagon]
For the base case we show that the left hand side and the right hand side for $n = 1$ are equivalent. The left hand side is $p_1$ which is 1. The right hand side would be $frac{3*1^2 -1}{2} $ which is equivalent to 1.

Next we make the inductive hypothesis that the formula $$p_n = frac{3n^2-n}{2}$$ is true for n. Now we must show that it is also true for $n+1$
begin{align*}
p_{n+1} &= 1+4+7+dots+(3(n+1)-2)\
&=p_n+3(n+1)-2\
&= frac{3n^2 -n}{2} + 3n+1\
&= frac{3n^2 -n +6n +2}{2}\
&= frac{3n^2+5n+2}{2}\
&= frac{(3n^2+5n+2 +(n+1))+n+1}{2}\
&= frac{3n^2 +6n+3 -(n+1)}{2}\
&= frac{3(n+1)^2 -(n+1)}{2}
end{align*}
Thus we show that the formula is true for $n+1$.

By induction we conclude that the formula is true for all $n$
end{proof}

begin{proof}[Proof By Induction Hexagon]
For the base case we show that left hand side and the right hand side for $n=1$ are equivalent. The left hand side is $h_1$ which is 1. The right hand side is $2*1^2 - 1 = 1$. The two sides are equal and thus the equation is true for $n = 1$.

Next we make the inductive hypothesis that the formula $$h_n = 2n^2 -n$$ is true for n. Now we must show that it is also true for $n+1$.
begin{align*}
h_{n+1} &= 1 + 5 + 9+dots+4(n+1)-3\
&= h_n + 4n+1\
&= 2n^2 -n +4n+1\
&= 2n^2 +3n +1\
&= (2n^2+3n+1 + n+1) -(n+1)\
&= 2n^2 +4n +2 - (n+1)\
&=2(n+1)^2 - (n+1)
end{align*}
So the formula is true for $n+1$.

By induction we conclude that is also true for all n.
end{proof}
begin{problem}{2.16}
Give an alternative proof for Theorem 2.1 by assuming there is a largest
prime $p$ and considering the number $N = p! + 1$.
end{problem}
begin{proof}
Assume there is a largest prime $p$. Now consider the number $N$ where$$N= p!+1.$$
By definition
begin{align*}
p! &= 1*2*3*dots*(p-1)*(p) \ &and\
N &= 1*2*3*dots*(p-1)*(p)+1
end{align*}
By the definition of divisibility $p!$ is divisible by every number between 1 and $p$ inclusive. Also, since $p$ is the largest prime, all primes are included in the list of 1 to $p$. This also means that $N$ is not divisible by any of those numbers except for 1. However $N$ must be able to factor into primes. So there emerges a contradiction that $N$ has to be able to factor into primes that are not contained in the list 1 to $p$ so there must be a larger prime.

We conclude that there is no largest prime and thus infinite primes.
end{proof}

begin{problem}{2.21}
We saw in the text that if we wanted to have a thirteenth note that was
an F a perfect octave above the original F, then we had a slight problem
with our Pythagorean tuning. One way to deal with this problem is to
tune partway up the scale from the original F, and then tune down the
rest of the scale from this high F. (This doesn’t avoid the problem, of
course; it just moves it somewhere else.)
So, for example, the pitch ratio of that high F should be $frac{2}{1}$. Therefore,
if we tune down from this note to n12, we need to divide by $frac{3}{2}$, so the
pitch ratio for $n_{12}$ becomes $frac{4}{3}$ . Next, we could tune $n_{11}$, and so on. Of course, when tuning down, whenever a note falls below n1, you need to bring it back up an octave.

Use this minor variation in Pythagorean tuning to finish filling in
the pitch ratios for the twelve notes of the scale by working up the scale
for $n_1$,..., $n_9$, and then down the scale for $n_{12}$, $n_{11}$, $n_{10}$:
begin{center}
begin{tabularx}{textwidth}{|X|X|X|X|X|X|X|X|X|X|X|X|}
hline
n1 & n8 & n3 & n10 & n5 & n12 & n7 & n2 & n9 & n4 & n11 & n6 \
hline
1/1 & 2187/2048 & 9/8 & 19683/16384 & 81/64 & 4/3 & 729/512 & 3/2 & 6561/4096 & 27/16 & 59049/32768 & 243/128 \
hline
end{tabularx}
end{center}

end{problem}

end{document}









share|improve this question









New contributor




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




















  • Welcome to TeX SX! Could you post a complete code, so we know what paper size you use, whether you load geometry, &c.?
    – Bernard
    4 hours ago










  • @Bernard Done just updated
    – Mataan P
    3 hours ago










  • @Kurt So interestingly enough this worked very well, however one of the slashes bleeds into another box a little, but the answer below seems to work perfectly
    – Mataan P
    3 hours ago













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have this very simple table code. I initially didnt use tabularx, but then the table would run off the right side of the page. So instead i used tabularx. Now, the text within a box seems to overlap with other text, check the photo below.



begin{center}
begin{tabularx}{textwidth}{|X|X|X|X|X|X|X|X|X|X|X|X|}
hline
n1 & n8 & n3 & n10 & n5 & n12 & n7 & n2 & n9 & n4 & n11 & n6 \
hline
1/1 & 2187/2048 & 9/8 & 19683/16384 & 81/64 & 4/3 & 729/512 &
3/2 & 6561/4096 & 27/16 & 59049/32768 & 243/128 \
hline
end{tabularx}
end{center}


enter image description here



How could i fix this?



The full page is found below



documentclass[12pt]{article}
usepackage[margin=1in]{geometry}
usepackage{amsmath,amsthm,amssymb,amsfonts}
usepackage[shortlabels]{enumitem}
usepackage{graphicx}
usepackage{tabularx}

newcommand{NN}{mathbb{N}}
newcommand{ZZ}{mathbb{Z}}

newenvironment{problem}[2][Problem]{begin{trivlist}
item[hskip labelsep {bfseries #1}hskip labelsep {bfseries #2.}]}{end{trivlist}}
%If you want to title your bold things something different just make another thing exactly like this but replace "problem" with the name of the thing you want, like theorem or lemma or whatever

begin{document}

%renewcommand{qedsymbol}{filledbox}
%Good resources for looking up how to do stuff:
%Binary operators: http://www.access2science.com/latex/Binary.html
%General help: http://en.wikibooks.org/wiki/LaTeX/Mathematics
%Or just google stuff

title{Homework #1}
author{Mataan Peer}
maketitle

begin{problem}{2.4}
Give a visual, geometric proof of the fact mentioned in the text
(using ideas similar to those in Figures 2.2 and 2.3) that $8*t_n + 1$ is a
square by showing in a diagram how eight triangular arrays of stones
together with one extra stone can be arranged into a square array of
stones.
end{problem}
begin{proof}
includegraphics[width=4in]{Triangular_Numbers.jpeg}
end{proof}

begin{problem}{2.12}
In addition to square and triangular numbers Nicomachus also
discussed other numbers with geometric qualities. The $pentagonal$
numbers are the numbers
$$1, 5, 12, 22, 35, ...$$
and the hexagonal numbers are the numbers
$$1, 6, 15, 28, 45, ...$$
that represent ever larger patterns of pentagons and hexagons,
respectively, analogous to the pattern of triangles shown in
Figure 2.1.
begin{enumerate}[a]
item Draw the patterns of pentagons and hexagons that produce the
first five pentagonal numbers, and the first five hexagonal
numbers.
item Note that we can write a pentagonal number such as 35 using a
sum of the differences between successive pentagonal numbers:
$$35 = 1 + 4 + 7 + 10 + 13.$$
We can do the same thing for hexagonal numbers:
$$45 = 1 + 5 + 9 + 13 + 17.$$
By the way, it should be easy for you to see what these differences
represent in the patterns you drew in part (a).

Write a formula for the $n$th pentagonal number $p_n$ using a
sum of the differences between the first $n$ pentagonal numbers.
Your formula should look a lot like the formula we know for the
$n$th square number: $1 + 3 + 5 +dots+ (2n-1$).
item Write a formula for the $n$th hexagonal number $h_n$ using a sum of
the differences between the first $n$ hexagonal numbers.
item Find closed formulas for $p_n$ and $h_n$; that is, find formulas similar
to the formula $t_n = frac{n(n+1)}{2}$. Then use induction to verify these
formulas. For the induction step you will need your formulas
from parts (b) and (c).
end{enumerate}

Nicomachus extended this idea and also considered septagonal and
octagonal numbers for which there are similar patterns and formulas.
end{problem}
begin{proof}[Answer for a]
includegraphics[angle=-90,width=4in]{Hexagonal and Pentagonal.jpg}
phantomqedhere
end{proof}
begin{proof}[Answer for b]
phantomqedhere
$$p_n = 1+4+7+dots+(3n-2)$$
end{proof}
begin{proof}[Answer for c]
phantomqedhere
$$h_n = 1+5+9+dots+(4n-3)$$
end{proof}
begin{proof}[Answer for first part of d]
$$p_n = frac{3n^2-n}{2}$$
$$h_n = 2n^2 -n $$

end{proof}
begin{proof}[Proof By Induction Pentagon]
For the base case we show that the left hand side and the right hand side for $n = 1$ are equivalent. The left hand side is $p_1$ which is 1. The right hand side would be $frac{3*1^2 -1}{2} $ which is equivalent to 1.

Next we make the inductive hypothesis that the formula $$p_n = frac{3n^2-n}{2}$$ is true for n. Now we must show that it is also true for $n+1$
begin{align*}
p_{n+1} &= 1+4+7+dots+(3(n+1)-2)\
&=p_n+3(n+1)-2\
&= frac{3n^2 -n}{2} + 3n+1\
&= frac{3n^2 -n +6n +2}{2}\
&= frac{3n^2+5n+2}{2}\
&= frac{(3n^2+5n+2 +(n+1))+n+1}{2}\
&= frac{3n^2 +6n+3 -(n+1)}{2}\
&= frac{3(n+1)^2 -(n+1)}{2}
end{align*}
Thus we show that the formula is true for $n+1$.

By induction we conclude that the formula is true for all $n$
end{proof}

begin{proof}[Proof By Induction Hexagon]
For the base case we show that left hand side and the right hand side for $n=1$ are equivalent. The left hand side is $h_1$ which is 1. The right hand side is $2*1^2 - 1 = 1$. The two sides are equal and thus the equation is true for $n = 1$.

Next we make the inductive hypothesis that the formula $$h_n = 2n^2 -n$$ is true for n. Now we must show that it is also true for $n+1$.
begin{align*}
h_{n+1} &= 1 + 5 + 9+dots+4(n+1)-3\
&= h_n + 4n+1\
&= 2n^2 -n +4n+1\
&= 2n^2 +3n +1\
&= (2n^2+3n+1 + n+1) -(n+1)\
&= 2n^2 +4n +2 - (n+1)\
&=2(n+1)^2 - (n+1)
end{align*}
So the formula is true for $n+1$.

By induction we conclude that is also true for all n.
end{proof}
begin{problem}{2.16}
Give an alternative proof for Theorem 2.1 by assuming there is a largest
prime $p$ and considering the number $N = p! + 1$.
end{problem}
begin{proof}
Assume there is a largest prime $p$. Now consider the number $N$ where$$N= p!+1.$$
By definition
begin{align*}
p! &= 1*2*3*dots*(p-1)*(p) \ &and\
N &= 1*2*3*dots*(p-1)*(p)+1
end{align*}
By the definition of divisibility $p!$ is divisible by every number between 1 and $p$ inclusive. Also, since $p$ is the largest prime, all primes are included in the list of 1 to $p$. This also means that $N$ is not divisible by any of those numbers except for 1. However $N$ must be able to factor into primes. So there emerges a contradiction that $N$ has to be able to factor into primes that are not contained in the list 1 to $p$ so there must be a larger prime.

We conclude that there is no largest prime and thus infinite primes.
end{proof}

begin{problem}{2.21}
We saw in the text that if we wanted to have a thirteenth note that was
an F a perfect octave above the original F, then we had a slight problem
with our Pythagorean tuning. One way to deal with this problem is to
tune partway up the scale from the original F, and then tune down the
rest of the scale from this high F. (This doesn’t avoid the problem, of
course; it just moves it somewhere else.)
So, for example, the pitch ratio of that high F should be $frac{2}{1}$. Therefore,
if we tune down from this note to n12, we need to divide by $frac{3}{2}$, so the
pitch ratio for $n_{12}$ becomes $frac{4}{3}$ . Next, we could tune $n_{11}$, and so on. Of course, when tuning down, whenever a note falls below n1, you need to bring it back up an octave.

Use this minor variation in Pythagorean tuning to finish filling in
the pitch ratios for the twelve notes of the scale by working up the scale
for $n_1$,..., $n_9$, and then down the scale for $n_{12}$, $n_{11}$, $n_{10}$:
begin{center}
begin{tabularx}{textwidth}{|X|X|X|X|X|X|X|X|X|X|X|X|}
hline
n1 & n8 & n3 & n10 & n5 & n12 & n7 & n2 & n9 & n4 & n11 & n6 \
hline
1/1 & 2187/2048 & 9/8 & 19683/16384 & 81/64 & 4/3 & 729/512 & 3/2 & 6561/4096 & 27/16 & 59049/32768 & 243/128 \
hline
end{tabularx}
end{center}

end{problem}

end{document}









share|improve this question









New contributor




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











I have this very simple table code. I initially didnt use tabularx, but then the table would run off the right side of the page. So instead i used tabularx. Now, the text within a box seems to overlap with other text, check the photo below.



begin{center}
begin{tabularx}{textwidth}{|X|X|X|X|X|X|X|X|X|X|X|X|}
hline
n1 & n8 & n3 & n10 & n5 & n12 & n7 & n2 & n9 & n4 & n11 & n6 \
hline
1/1 & 2187/2048 & 9/8 & 19683/16384 & 81/64 & 4/3 & 729/512 &
3/2 & 6561/4096 & 27/16 & 59049/32768 & 243/128 \
hline
end{tabularx}
end{center}


enter image description here



How could i fix this?



The full page is found below



documentclass[12pt]{article}
usepackage[margin=1in]{geometry}
usepackage{amsmath,amsthm,amssymb,amsfonts}
usepackage[shortlabels]{enumitem}
usepackage{graphicx}
usepackage{tabularx}

newcommand{NN}{mathbb{N}}
newcommand{ZZ}{mathbb{Z}}

newenvironment{problem}[2][Problem]{begin{trivlist}
item[hskip labelsep {bfseries #1}hskip labelsep {bfseries #2.}]}{end{trivlist}}
%If you want to title your bold things something different just make another thing exactly like this but replace "problem" with the name of the thing you want, like theorem or lemma or whatever

begin{document}

%renewcommand{qedsymbol}{filledbox}
%Good resources for looking up how to do stuff:
%Binary operators: http://www.access2science.com/latex/Binary.html
%General help: http://en.wikibooks.org/wiki/LaTeX/Mathematics
%Or just google stuff

title{Homework #1}
author{Mataan Peer}
maketitle

begin{problem}{2.4}
Give a visual, geometric proof of the fact mentioned in the text
(using ideas similar to those in Figures 2.2 and 2.3) that $8*t_n + 1$ is a
square by showing in a diagram how eight triangular arrays of stones
together with one extra stone can be arranged into a square array of
stones.
end{problem}
begin{proof}
includegraphics[width=4in]{Triangular_Numbers.jpeg}
end{proof}

begin{problem}{2.12}
In addition to square and triangular numbers Nicomachus also
discussed other numbers with geometric qualities. The $pentagonal$
numbers are the numbers
$$1, 5, 12, 22, 35, ...$$
and the hexagonal numbers are the numbers
$$1, 6, 15, 28, 45, ...$$
that represent ever larger patterns of pentagons and hexagons,
respectively, analogous to the pattern of triangles shown in
Figure 2.1.
begin{enumerate}[a]
item Draw the patterns of pentagons and hexagons that produce the
first five pentagonal numbers, and the first five hexagonal
numbers.
item Note that we can write a pentagonal number such as 35 using a
sum of the differences between successive pentagonal numbers:
$$35 = 1 + 4 + 7 + 10 + 13.$$
We can do the same thing for hexagonal numbers:
$$45 = 1 + 5 + 9 + 13 + 17.$$
By the way, it should be easy for you to see what these differences
represent in the patterns you drew in part (a).

Write a formula for the $n$th pentagonal number $p_n$ using a
sum of the differences between the first $n$ pentagonal numbers.
Your formula should look a lot like the formula we know for the
$n$th square number: $1 + 3 + 5 +dots+ (2n-1$).
item Write a formula for the $n$th hexagonal number $h_n$ using a sum of
the differences between the first $n$ hexagonal numbers.
item Find closed formulas for $p_n$ and $h_n$; that is, find formulas similar
to the formula $t_n = frac{n(n+1)}{2}$. Then use induction to verify these
formulas. For the induction step you will need your formulas
from parts (b) and (c).
end{enumerate}

Nicomachus extended this idea and also considered septagonal and
octagonal numbers for which there are similar patterns and formulas.
end{problem}
begin{proof}[Answer for a]
includegraphics[angle=-90,width=4in]{Hexagonal and Pentagonal.jpg}
phantomqedhere
end{proof}
begin{proof}[Answer for b]
phantomqedhere
$$p_n = 1+4+7+dots+(3n-2)$$
end{proof}
begin{proof}[Answer for c]
phantomqedhere
$$h_n = 1+5+9+dots+(4n-3)$$
end{proof}
begin{proof}[Answer for first part of d]
$$p_n = frac{3n^2-n}{2}$$
$$h_n = 2n^2 -n $$

end{proof}
begin{proof}[Proof By Induction Pentagon]
For the base case we show that the left hand side and the right hand side for $n = 1$ are equivalent. The left hand side is $p_1$ which is 1. The right hand side would be $frac{3*1^2 -1}{2} $ which is equivalent to 1.

Next we make the inductive hypothesis that the formula $$p_n = frac{3n^2-n}{2}$$ is true for n. Now we must show that it is also true for $n+1$
begin{align*}
p_{n+1} &= 1+4+7+dots+(3(n+1)-2)\
&=p_n+3(n+1)-2\
&= frac{3n^2 -n}{2} + 3n+1\
&= frac{3n^2 -n +6n +2}{2}\
&= frac{3n^2+5n+2}{2}\
&= frac{(3n^2+5n+2 +(n+1))+n+1}{2}\
&= frac{3n^2 +6n+3 -(n+1)}{2}\
&= frac{3(n+1)^2 -(n+1)}{2}
end{align*}
Thus we show that the formula is true for $n+1$.

By induction we conclude that the formula is true for all $n$
end{proof}

begin{proof}[Proof By Induction Hexagon]
For the base case we show that left hand side and the right hand side for $n=1$ are equivalent. The left hand side is $h_1$ which is 1. The right hand side is $2*1^2 - 1 = 1$. The two sides are equal and thus the equation is true for $n = 1$.

Next we make the inductive hypothesis that the formula $$h_n = 2n^2 -n$$ is true for n. Now we must show that it is also true for $n+1$.
begin{align*}
h_{n+1} &= 1 + 5 + 9+dots+4(n+1)-3\
&= h_n + 4n+1\
&= 2n^2 -n +4n+1\
&= 2n^2 +3n +1\
&= (2n^2+3n+1 + n+1) -(n+1)\
&= 2n^2 +4n +2 - (n+1)\
&=2(n+1)^2 - (n+1)
end{align*}
So the formula is true for $n+1$.

By induction we conclude that is also true for all n.
end{proof}
begin{problem}{2.16}
Give an alternative proof for Theorem 2.1 by assuming there is a largest
prime $p$ and considering the number $N = p! + 1$.
end{problem}
begin{proof}
Assume there is a largest prime $p$. Now consider the number $N$ where$$N= p!+1.$$
By definition
begin{align*}
p! &= 1*2*3*dots*(p-1)*(p) \ &and\
N &= 1*2*3*dots*(p-1)*(p)+1
end{align*}
By the definition of divisibility $p!$ is divisible by every number between 1 and $p$ inclusive. Also, since $p$ is the largest prime, all primes are included in the list of 1 to $p$. This also means that $N$ is not divisible by any of those numbers except for 1. However $N$ must be able to factor into primes. So there emerges a contradiction that $N$ has to be able to factor into primes that are not contained in the list 1 to $p$ so there must be a larger prime.

We conclude that there is no largest prime and thus infinite primes.
end{proof}

begin{problem}{2.21}
We saw in the text that if we wanted to have a thirteenth note that was
an F a perfect octave above the original F, then we had a slight problem
with our Pythagorean tuning. One way to deal with this problem is to
tune partway up the scale from the original F, and then tune down the
rest of the scale from this high F. (This doesn’t avoid the problem, of
course; it just moves it somewhere else.)
So, for example, the pitch ratio of that high F should be $frac{2}{1}$. Therefore,
if we tune down from this note to n12, we need to divide by $frac{3}{2}$, so the
pitch ratio for $n_{12}$ becomes $frac{4}{3}$ . Next, we could tune $n_{11}$, and so on. Of course, when tuning down, whenever a note falls below n1, you need to bring it back up an octave.

Use this minor variation in Pythagorean tuning to finish filling in
the pitch ratios for the twelve notes of the scale by working up the scale
for $n_1$,..., $n_9$, and then down the scale for $n_{12}$, $n_{11}$, $n_{10}$:
begin{center}
begin{tabularx}{textwidth}{|X|X|X|X|X|X|X|X|X|X|X|X|}
hline
n1 & n8 & n3 & n10 & n5 & n12 & n7 & n2 & n9 & n4 & n11 & n6 \
hline
1/1 & 2187/2048 & 9/8 & 19683/16384 & 81/64 & 4/3 & 729/512 & 3/2 & 6561/4096 & 27/16 & 59049/32768 & 243/128 \
hline
end{tabularx}
end{center}

end{problem}

end{document}






tabularx






share|improve this question









New contributor




Mataan P 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




Mataan P 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 3 hours ago





















New contributor




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









asked 4 hours ago









Mataan P

83




83




New contributor




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





New contributor





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






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












  • Welcome to TeX SX! Could you post a complete code, so we know what paper size you use, whether you load geometry, &c.?
    – Bernard
    4 hours ago










  • @Bernard Done just updated
    – Mataan P
    3 hours ago










  • @Kurt So interestingly enough this worked very well, however one of the slashes bleeds into another box a little, but the answer below seems to work perfectly
    – Mataan P
    3 hours ago


















  • Welcome to TeX SX! Could you post a complete code, so we know what paper size you use, whether you load geometry, &c.?
    – Bernard
    4 hours ago










  • @Bernard Done just updated
    – Mataan P
    3 hours ago










  • @Kurt So interestingly enough this worked very well, however one of the slashes bleeds into another box a little, but the answer below seems to work perfectly
    – Mataan P
    3 hours ago
















Welcome to TeX SX! Could you post a complete code, so we know what paper size you use, whether you load geometry, &c.?
– Bernard
4 hours ago




Welcome to TeX SX! Could you post a complete code, so we know what paper size you use, whether you load geometry, &c.?
– Bernard
4 hours ago












@Bernard Done just updated
– Mataan P
3 hours ago




@Bernard Done just updated
– Mataan P
3 hours ago












@Kurt So interestingly enough this worked very well, however one of the slashes bleeds into another box a little, but the answer below seems to work perfectly
– Mataan P
3 hours ago




@Kurt So interestingly enough this worked very well, however one of the slashes bleeds into another box a little, but the answer below seems to work perfectly
– Mataan P
3 hours ago










1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










Please try the following



documentclass[UTF8, english]{article}

usepackage{tabularx}

begin{document}

renewcommand{arraystretch}{2}
centering
begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|}
hline
n1 & n8 & n3 & n10 & n5 & n12 & n7 & n2 & n9 & n4 & n11 & n6 \
hline
$frac{1}{1}$ & $frac{2187}{2048}$ & $frac{9}{8}$ & $frac{19683}{16384}$ & $frac{81}{64}$ & $frac{4}{3}$ & $frac{729}{512}$ & $frac{3}{2}$ & $frac{6561}{4096}$ & $frac{27}{16}$ & $frac{59049}{32768}$ & $frac{243}{128}$ \
hline
end{tabular}

end{document}


Looks like



table






share|improve this answer

















  • 1




    Awesome thanks so much zyy!
    – Mataan P
    3 hours ago










  • @MataanP You are absolutely welcome!
    – zyy
    2 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
});


}
});






Mataan P 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%2f462484%2fusing-tabularx-with-very-simple-multirow-table-i-get-text-overlap%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
2
down vote



accepted










Please try the following



documentclass[UTF8, english]{article}

usepackage{tabularx}

begin{document}

renewcommand{arraystretch}{2}
centering
begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|}
hline
n1 & n8 & n3 & n10 & n5 & n12 & n7 & n2 & n9 & n4 & n11 & n6 \
hline
$frac{1}{1}$ & $frac{2187}{2048}$ & $frac{9}{8}$ & $frac{19683}{16384}$ & $frac{81}{64}$ & $frac{4}{3}$ & $frac{729}{512}$ & $frac{3}{2}$ & $frac{6561}{4096}$ & $frac{27}{16}$ & $frac{59049}{32768}$ & $frac{243}{128}$ \
hline
end{tabular}

end{document}


Looks like



table






share|improve this answer

















  • 1




    Awesome thanks so much zyy!
    – Mataan P
    3 hours ago










  • @MataanP You are absolutely welcome!
    – zyy
    2 hours ago















up vote
2
down vote



accepted










Please try the following



documentclass[UTF8, english]{article}

usepackage{tabularx}

begin{document}

renewcommand{arraystretch}{2}
centering
begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|}
hline
n1 & n8 & n3 & n10 & n5 & n12 & n7 & n2 & n9 & n4 & n11 & n6 \
hline
$frac{1}{1}$ & $frac{2187}{2048}$ & $frac{9}{8}$ & $frac{19683}{16384}$ & $frac{81}{64}$ & $frac{4}{3}$ & $frac{729}{512}$ & $frac{3}{2}$ & $frac{6561}{4096}$ & $frac{27}{16}$ & $frac{59049}{32768}$ & $frac{243}{128}$ \
hline
end{tabular}

end{document}


Looks like



table






share|improve this answer

















  • 1




    Awesome thanks so much zyy!
    – Mataan P
    3 hours ago










  • @MataanP You are absolutely welcome!
    – zyy
    2 hours ago













up vote
2
down vote



accepted







up vote
2
down vote



accepted






Please try the following



documentclass[UTF8, english]{article}

usepackage{tabularx}

begin{document}

renewcommand{arraystretch}{2}
centering
begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|}
hline
n1 & n8 & n3 & n10 & n5 & n12 & n7 & n2 & n9 & n4 & n11 & n6 \
hline
$frac{1}{1}$ & $frac{2187}{2048}$ & $frac{9}{8}$ & $frac{19683}{16384}$ & $frac{81}{64}$ & $frac{4}{3}$ & $frac{729}{512}$ & $frac{3}{2}$ & $frac{6561}{4096}$ & $frac{27}{16}$ & $frac{59049}{32768}$ & $frac{243}{128}$ \
hline
end{tabular}

end{document}


Looks like



table






share|improve this answer












Please try the following



documentclass[UTF8, english]{article}

usepackage{tabularx}

begin{document}

renewcommand{arraystretch}{2}
centering
begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|}
hline
n1 & n8 & n3 & n10 & n5 & n12 & n7 & n2 & n9 & n4 & n11 & n6 \
hline
$frac{1}{1}$ & $frac{2187}{2048}$ & $frac{9}{8}$ & $frac{19683}{16384}$ & $frac{81}{64}$ & $frac{4}{3}$ & $frac{729}{512}$ & $frac{3}{2}$ & $frac{6561}{4096}$ & $frac{27}{16}$ & $frac{59049}{32768}$ & $frac{243}{128}$ \
hline
end{tabular}

end{document}


Looks like



table







share|improve this answer












share|improve this answer



share|improve this answer










answered 4 hours ago









zyy

665613




665613








  • 1




    Awesome thanks so much zyy!
    – Mataan P
    3 hours ago










  • @MataanP You are absolutely welcome!
    – zyy
    2 hours ago














  • 1




    Awesome thanks so much zyy!
    – Mataan P
    3 hours ago










  • @MataanP You are absolutely welcome!
    – zyy
    2 hours ago








1




1




Awesome thanks so much zyy!
– Mataan P
3 hours ago




Awesome thanks so much zyy!
– Mataan P
3 hours ago












@MataanP You are absolutely welcome!
– zyy
2 hours ago




@MataanP You are absolutely welcome!
– zyy
2 hours ago










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










draft saved

draft discarded


















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













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












Mataan P 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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462484%2fusing-tabularx-with-very-simple-multirow-table-i-get-text-overlap%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号伴広島線

Setup Asymptote in Texstudio