0

I am using bookdown, and it's fantastic. But in the generated PDF, some pages have text that "falls off" the bottom of the page:

enter image description here

Whole sections have disappeared: Section 3.4.2, Section 3.4.3, and the rest of Section 3.4.1 just aren't there.

What has happened to it? I'm not sure what else to post. It seems to happen at random places and occurs uncommonly, and I can't see any common thread. That means I can't post a MWE as I can't just recreate it at will.

All looks well in the HTML version.

And the corresponding LaTeX code has no features that should raise any eyebrows that I can see (I can post if needed...).

\hypertarget{RetrospectiveStudies}{% \subsection{Retrospective studies}\label{RetrospectiveStudies}}

In \emph{retrospective studies}, the Outcome is observed \emph{now}, and the researchers look \emph{back} to see what Comparison group they came from (e.g.~case-control studies).

\BeginKnitrBlock{example} \protect\hypertarget{exm:unnamed-chunk-73}{}{\label{exm:unnamed-chunk-73} }A 2012 Australian study (Pamphlett \protect\hyperlink{ref-data:Pamphlett:toxins}{2012}) examined patients with and without SMND, and asked about the extent of their \emph{past} exposure to metals. In this study, the Outcome (whether or not the respondent had SMND) is assessed now, and the extent of their exposure to metals (Comparison) is assessed from the \emph{past} exposure. This is a \emph{retrospective} observational study. \EndKnitrBlock{example}

\hypertarget{ProspectiveStudies}{% \subsection{Prospective studies}\label{ProspectiveStudies}}

In \emph{prospective studies}, the Comparison is determined \emph{now}, and researchers look \emph{ahead} to assess or measure the Outcome (e.g.~Prospective cohort studies).

\BeginKnitrBlock{example} \protect\hypertarget{exm:unnamed-chunk-74}{}{\label{exm:unnamed-chunk-74} }A 2008 paper (Choi and Curhan \protect\hyperlink{ref-data:Choi2008:GoutSoftdrinks}{2008}) measured the softdrink consumption of men, and determined who experienced gout over the following 12 years. The Outcome (whether or not the individuals experience gout) is determined in the future. The connection (the amount of softdrink consumed) is measured now. This is a \emph{prospective} observational study. \EndKnitrBlock{example}

\hypertarget{CrosssectionalStudies}{% \subsection{Cross-sectional studies}\label{CrosssectionalStudies}}

In \emph{cross-sectional studies}, both the Outcome and Comparison are gathered \emph{now}.

\BeginKnitrBlock{example} \protect\hypertarget{exm:unnamed-chunk-75}{}{\label{exm:unnamed-chunk-75} }A study (Russell et al. \protect\hyperlink{ref-data:Russell2014:FoodInsecurity}{2014}) asked older Australian their opinions of their own food security, and recorded their living arrangements. Individuals' responses to both living arrangements and opinions on food security are obtained \emph{now}. This is a \emph{cross-sectional} observational study. \EndKnitrBlock{example}

\BeginKnitrBlock{rmdthink} In South Australia in 1988--1989, 25 cases of legionella infections (an unusually high number) were investigated (O'Connor et al. \protect\hyperlink{ref-data:oconnor:pottingmix}{2007}). All 25 cases were gardeners, with hanging baskets of ferns.

Researchers compared 25 cases with legionella infections with 75 non-cases, matching on the basis of age (within 5 years), sex, post codes.

The use of potting mix in the previous four weeks was associated with an increase in the risk of contracting illness of about 4.7 times.

Why \emph{type} of observational study is this? \EndKnitrBlock{rmdthink}

\BeginKnitrBlock{fold} A \emph{retrospective} observational study, because people were identified with an infection \emph{now}, and then the researchers looked \emph{backwards} at what activities they had been involved in. \EndKnitrBlock{fold}

\hypertarget{ExperimentalStudies}{% \section{Experimental studies}\label{ExperimentalStudies}}

Experimental studies (Fig. \ref{fig:POCIExperiment}) are are commonly used, and well-designed experimental studies can be used to establish a cause-and-effect relationship. However, experimental studies can not always be used.

Had anyone else seen this happen before? Why? How can I stop it?

Thanks for insights.

P.

Pete
  • 199
  • 6
  • The LaTeX code as quoted here would be invalid since various `%` are commenting vital parts. I assume that the real code is formatted differently. Without a [mcve] this is almost impossible to analyze, though. – Ralf Stubner Mar 01 '19 at 19:21
  • Thanks for your reply @RalfStubner. But no, that is the **real code**: That is the **exact LaTeX** being produced by bookdown. I have not touched it. So I guess that is an alternative phrasing of the question, or an alternative-but-probably-related-question: *Why* are those bits commented in the LaTeX that is produced? I'm getting this dodgy PDF document with bits not there... and I can't figure why. Thanks P. – Pete Mar 05 '19 at 00:22
  • Strange, but without an example I see no way to find the reason for this. – Ralf Stubner Mar 05 '19 at 10:09

0 Answers0