Text overflowing below the page number in Quarto book

I am writing a Quarto book, and in one of the chapters I added an example div environment within which I included an R-generated figure as follows:

::: {#exm-kurt}
    For a second illustration of inferences about skewness and kurtosis of a population, I'll use an example from Bulmer:
    
    |             |     |     |     |     |     |     |     |     |     |     |     |     |
    |-------------|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
    | Litter Size |  1  |  2  |  4  |  5  |  6  |  7  |  8  |  9  | 10  | 11  | 12  | 13  |
    | Frequency   |  7  | 33  | 58  | 116 | 125 | 126 | 121 | 107 | 56  | 37  | 25  |  4  |
    
    : Frequency distribution of litter size in rats, n=815
    
    ```{r, echo=FALSE, out.width='50%', fig.align='center', fig.asp=1, fig.cap="Histogram of Litter Size"}
    s <- c(1,2,3,4,5,6,7,8,9,10,11,12)
    f <- c(7,33,58,116,125,126,121,107,56,37,25,4)
    
    t <- rep(s, f)
    
    hist(t, probability = FALSE, xlab = 'Litter Size', 
         col = 'darkblue',
         density = 20,
         main = 'Histogram of Litter Size')
    box(col = 'black')
    ```
    
    I'll spare you the detailed calculations, but you should be able to verify them by following equation 1 and equation 2:
    
    $$
    n = 815\quad \bar{x} = 6.1252\quad m_{2} = 5.1721\quad m_{3} = 2.0316
    $$
    
    skewness $g_1=0.1727$ and sample skewness $G_1=0.1730$. The sample is roughly symmetric but slightly skewed right, which looks about right from the histogram. The standard error from skewness is:
    
    $$
    SES = \sqrt{(6\cdot 815\cdot 814)/(813\cdot816\cdot818)}=0.0856
    $$
    
    Dividing the skewness by the $SES$, you get the test statistics
    
    $$
    Z_{g_1}= 0.1730/0.0856=2.02
    $$
    
    Since this is greater than 2, you can say that there is some positive skewness in the population. Again, some positive skewness just means a figure greater than zero; it doesn't tell us anything more about the magnitude of the skewness.
    
    If you go on to compute $95\%$ confidence interval of skewness from equation 4, you get $0.1730\pm2\times0.0856=\left[0;0.34\right]$.
    
    What about the kurtosis? You should be able to follow equation 5 and compute a fourth moment of $m_4=67.3948$. You already have $m_2=5.1721$, and therefore kurtosis $a_4=m_4/m_2^2=67.3948/5.1721^2=2.5194$, excess kurtosis $g_2=2.5194-3=-0.4806$, and sample excess kurtosis $G_2=\left[814/(813\times812)\right]\left[816\times(-0.4806+6)\right]=-0.4762$
    
    So the sample is moderately less peaked than a normal distribution. Again, this matches the histogram, where you can see the higher shoulders.
    
    What is anything can you say about the population? For this you need equation 7. Begin by computing the standard error of kurtosis, using $n=815$ and the previously computed $SES$ of $0.0856$
    
    $$
    \begin{aligned}
    SEK &= 2\times SES\times \sqrt{(n^2-1)/((n-3)(n+5))}\\
    SEK &= 2\times 0.0856\times\sqrt{(815^2-1)/(812\times820)}=0.1711
    \end{aligned}
    $$
    
    and divide:
    
    $$
    Z_{g_2} = G_2/SEK=-0.4762/0.1711=-2.78
    $$
    
    Since $Z_{g_2}$ is comfortably below $-2$, you can say that the distribution of all litter sizes is platykurtic, less sharply peaked that the normal distribution. But be careful: you know that it is platykurtic, but you don't know by how much.
    
    You already know the population is not normal, but let's apply the Pearson test anyway:
    
    $$
    \begin{aligned}
    DP &= 2.02^2 + 2.78^2 = 11.8088\\
    p-value &= P(\chi^2_2>11.8088) = 0.0027
    \end{aligned}
    $$
    
    The test agrees with the separate tests of skewness and kurtosis: sizes of rat litters, for the entire population of rats, are not normally distributed.
    :::

The problem is that whenever I run the code it gives me a text which overflows below the page number in a particular page, as can be seen here:

Is there a way I can make sure the text is placed properly? Thank you very much in advance.

Try putting a \newpage after “Bulmar” are a little earlier. May need tweaking with where the hyphen falls.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

@smaanan Can you try with latest 1.4 version currently pre-release ? (https://quarto.org to get it).

I can't reproduce this with it

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.