public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Type running off page with Lattice & ggplot2 graphics using knitr, pandoc, Rmd, to PDF
@ 2015-02-10 16:51 Branden Williams
       [not found] ` <01621721-7aae-4575-9ea2-aaa0e23d2bb0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Branden Williams @ 2015-02-10 16:51 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


[-- Attachment #1.1: Type: text/plain, Size: 2672 bytes --]

 

I am really digging into R-Markdown as a method of performing reproducible 
research. I have been successful in processing my Rmd files to both HTML 
and MS Word using knitr and pandoc (including passing both text and images 
through pander for fancifying). HTML is pretty straight forward, Word did a 
reasonable enough job (I had to do some additional formatting before 
submitting that manuscript). 

Now, I'm trying to convert to PDF. I have customized the yaml header to 
look like this:
bibliography: citations.bib output: pdf_document: fig_caption: yes fig_crop: 
no fig_height: 3 fig_width: 4.5 keep_tex: yes latex_engine: xelatex 
number_sections: yes word_document: fig_caption: yes documentclass: article 
csl: vancouver.csl 


I am having one hell of a time with a very strange effect. Tables are set 
properly in the text, no problem. However, graphs (does not matter if it is 
ggplot2 or lattice) are hosing the typesetting up pretty badly. I've 
included a screencap to show you what is happening with the text. The image 
is up at the top of that page, and it's like the conversion to PDF 
considers the image as a line or two of text and does not account for the 
actual vertical space it is taking up. The page number is placed properly 
on the page as you will see, but text just keeps running all the way off 
and disappears into nothing. It's not on the next page, it's just gone.

Anyone seen something like this before? Is there something dumb I am doing?

Here's an example of a code block that creates an image with this 
phenomenon.

```{r echo=FALSE, fig.cap="This graph is going to be AWESOME."} xyplot(x ~ y | z, myData, pch=19, type = c('p', 'r'), xlab="x-vals", ylab="y-vals", as.table=TRUE) ```

[image: Screencap showing the problem]

The above screencap that shows the problem. The line in the middle is the 
page divider in the R PDF viewer.


FYI, I have also started a thread on StackOverflow 
<http://stackoverflow.com/questions/28432019/to-type-running-off-page-with-lattice-ggplot2-graphics-using-knitr-pandoc-rm>. 
I will cross post any results that work.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/01621721-7aae-4575-9ea2-aaa0e23d2bb0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 6326 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Type running off page with Lattice & ggplot2 graphics using knitr, pandoc, Rmd, to PDF
       [not found] ` <01621721-7aae-4575-9ea2-aaa0e23d2bb0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-02-10 19:47   ` John MacFarlane
       [not found]     ` <20150210194745.GB17792-0VdLhd/A9Pm0ooXD8Eul3fVEzZTyCGbZTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: John MacFarlane @ 2015-02-10 19:47 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

It could be this issue:
http://tex.stackexchange.com/questions/203629/longtable-and-floats-wrong-table-breaks-on-pages-with-floats-part-2/207748#207748

Do you have a table on the same page as the figure?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Type running off page with Lattice & ggplot2 graphics using knitr, pandoc, Rmd, to PDF
       [not found]     ` <20150210194745.GB17792-0VdLhd/A9Pm0ooXD8Eul3fVEzZTyCGbZTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
@ 2015-02-10 21:03       ` Branden Williams
       [not found]         ` <14ff2902-cd94-4ae8-a9ea-60d7f4fcf137-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Branden Williams @ 2015-02-10 21:03 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


[-- Attachment #1.1: Type: text/plain, Size: 1179 bytes --]

I did have one, and YES! That solved that minor issue! One interesting 
thing, however, is the figure is in the wrong place (perhaps related to the 
same issue). It has bumped to the top of the page where in the actual 
markdown text it is two paragraphs earlier. I assume this is due to sizing, 
and it just allows itself to bump across to the next page?

Also, breaking the tables across the page is problematic (that was the next 
problem I was going to tackle). 

So, if I am reading this correctly, I need to go back to ctable over 
longtable? Is there a configurable pandoc option for this somewhere?

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/14ff2902-cd94-4ae8-a9ea-60d7f4fcf137%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1601 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Type running off page with Lattice & ggplot2 graphics using knitr, pandoc, Rmd, to PDF
       [not found]         ` <14ff2902-cd94-4ae8-a9ea-60d7f4fcf137-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-02-11  1:08           ` John MacFarlane
       [not found]             ` <20150211010834.GG42246-qqGlgsTyhTiCiGiXOSDXzOeaTW2qgoyBqqGlgsTyhTjVYgS9aZXmwmsbx8vYGeVslXN7HHkbuXM@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: John MacFarlane @ 2015-02-11  1:08 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Branden Williams [Feb 10 15 13:03 ]:
>I did have one, and YES! That solved that minor issue! One interesting
>thing, however, is the figure is in the wrong place (perhaps related to the
>same issue). It has bumped to the top of the page where in the actual
>markdown text it is two paragraphs earlier. I assume this is due to sizing,
>and it just allows itself to bump across to the next page?

In LaTeX figures will "float" to an optimal location (as determined by
tex's algorithms).  There are ways to tweak this, but from pandoc you
have limited control.

>Also, breaking the tables across the page is problematic (that was the next
>problem I was going to tackle).
>
>So, if I am reading this correctly, I need to go back to ctable over
>longtable? Is there a configurable pandoc option for this somewhere?

No.  This is one of  the things that drives me most crazy.  longtable
has many disadvantages, but really is needed for longer tables.
I'm tempted to add a command-line option to use regular tables (or
maybe ctable) instead.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Type running off page with Lattice & ggplot2 graphics using knitr, pandoc, Rmd, to PDF
       [not found]             ` <20150211010834.GG42246-qqGlgsTyhTiCiGiXOSDXzOeaTW2qgoyBqqGlgsTyhTjVYgS9aZXmwmsbx8vYGeVslXN7HHkbuXM@public.gmane.org>
@ 2015-02-11 17:55               ` Branden Williams
       [not found]                 ` <24f742da-889e-4aa8-9773-771fe3a4774a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Branden Williams @ 2015-02-11 17:55 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


[-- Attachment #1.1: Type: text/plain, Size: 903 bytes --]

OK! So now we know what the culprit is. Is there any way to work around 
this so that the floats don't hose up the longtables? I saw the patch from 
the other link, but I'm unclear where that style sheet is. I didn't seem to 
see it anywhere. Is this something that needs to be updated in MacTeX 
through their package installer? 

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/24f742da-889e-4aa8-9773-771fe3a4774a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1316 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Type running off page with Lattice & ggplot2 graphics using knitr, pandoc, Rmd, to PDF
       [not found]                 ` <24f742da-889e-4aa8-9773-771fe3a4774a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-02-11 19:25                   ` John MacFarlane
       [not found]                     ` <20150211192502.GA11303-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: John MacFarlane @ 2015-02-11 19:25 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

You could put the patched longtable.sty in your working
directory; I think that would do it.

+++ Branden Williams [Feb 11 15 09:55 ]:
>   OK! So now we know what the culprit is. Is there any way to work around
>   this so that the floats don't hose up the longtables? I saw the patch
>   from the other link, but I'm unclear where that style sheet is. I
>   didn't seem to see it anywhere. Is this something that needs to be
>   updated in MacTeX through their package installer?
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/24f742da-889e-4aa8-
>   9773-771fe3a4774a%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/24f742da-889e-4aa8-9773-771fe3a4774a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Type running off page with Lattice & ggplot2 graphics using knitr, pandoc, Rmd, to PDF
       [not found]                     ` <20150211192502.GA11303-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
@ 2015-02-12  5:09                       ` Werner LEMBERG
       [not found]                         ` <20150212.060945.428913307.wl-mXXj517/zsQ@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Werner LEMBERG @ 2015-02-12  5:09 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw, jgm-TVLZxgkOlNX2fBVCVOL8/A

[-- Attachment #1: Type: Text/Plain, Size: 463 bytes --]


>>   OK! So now we know what the culprit is. Is there any way to work
>>   around this so that the floats don't hose up the longtables? I
>>   saw the patch from the other link, but I'm unclear where that
>>   style sheet is. I didn't seem to see it anywhere. Is this
>>   something that needs to be updated in MacTeX through their
>>   package installer?

Due to license reasons, you should rename longtables.sty.  Attached is
what I use instead.


     Werner

[-- Attachment #2: longtable-patched.sty --]
[-- Type: Text/Plain, Size: 12682 bytes --]

%% This is file `longtable-patched.sty'.
%%
%% It is the file `longtable.sty' (from the Standard LaTeX `Tools Bundle')
%% with a patch from
%%
%%   http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=tools/3512
%%
%% to fix a serious layout issue with floats.  This is a legal modification
%% based on the LPPL license since the file name has been changed.
%%
%% The original source code file `longtable.dtx' can be found at
%%
%%   http://ctan.org/pkg/longtable
%%
%%
%% For reference, here the original copyright notice.
%%
%% This is file `longtable.sty',
%% generated with the docstrip utility.
%%
%%
%% The original source files were:
%%
%% longtable.dtx  (with options: `package')
%% 
%% This is a generated file.
%% 
%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005
%% 2006 2008 2009
%% The LaTeX3 Project and any individual authors listed elsewhere
%% in this file.
%% 
%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'.
%% --------------------------------------------------------------------------
%% 
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%% 
%% This file may only be distributed together with a copy of the LaTeX
%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle'
%% without such generated files.
%% 
%% The list of all files belonging to the LaTeX `Tools Bundle' is
%% given in the file `manifest.txt'.
%% 
%% File: longtable.dtx Copyright (C) 1990-2001 David Carlisle
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{longtable-patched}
          [2014/01/29 v4.11-patched Multi-page Table package (DPC)]
\def\LT@err{\PackageError{longtable-patched}}
\def\LT@warn{\PackageWarning{longtable-patched}}
\def\LT@final@warn{%
  \AtEndDocument{%
    \LT@warn{Table \@width s have changed. Rerun LaTeX.\@gobbletwo}}%
  \global\let\LT@final@warn\relax}
\DeclareOption{errorshow}{%
  \def\LT@warn{\PackageInfo{longtable-patched}}}
\DeclareOption{pausing}{%
  \def\LT@warn#1{%
    \LT@err{#1}{This is not really an error}}}
\DeclareOption{set}{}
\DeclareOption{final}{}
\ProcessOptions
\newskip\LTleft       \LTleft=\fill
\newskip\LTright      \LTright=\fill
\newskip\LTpre        \LTpre=\bigskipamount
\newskip\LTpost       \LTpost=\bigskipamount
\newcount\LTchunksize \LTchunksize=20
\let\c@LTchunksize\LTchunksize
\newdimen\LTcapwidth  \LTcapwidth=4in
\newbox\LT@head
\newbox\LT@firsthead
\newbox\LT@foot
\newbox\LT@lastfoot
\newcount\LT@cols
\newcount\LT@rows
\newcounter{LT@tables}
\newcounter{LT@chunks}[LT@tables]
\ifx\c@table\undefined
  \newcounter{table}
  \def\fnum@table{\tablename~\thetable}
\fi
\ifx\tablename\undefined
  \def\tablename{Table}
\fi
\newtoks\LT@p@ftn
\mathchardef\LT@end@pen=30000
\def\longtable{%
  \par
  \ifx\multicols\@undefined
  \else
     \ifnum\col@number>\@ne
       \@twocolumntrue
     \fi
  \fi
  \if@twocolumn
    \LT@err{longtable not in 1-column mode}\@ehc
  \fi
  \begingroup
  \@ifnextchar[\LT@array{\LT@array[x]}}
\def\LT@array[#1]#2{%
  \refstepcounter{table}\stepcounter{LT@tables}%
  \if l#1%
    \LTleft\z@ \LTright\fill
  \else\if r#1%
    \LTleft\fill \LTright\z@
  \else\if c#1%
    \LTleft\fill \LTright\fill
  \fi\fi\fi
  \let\LT@mcol\multicolumn
  \let\LT@@tabarray\@tabarray
  \let\LT@@hl\hline
  \def\@tabarray{%
    \let\hline\LT@@hl
    \LT@@tabarray}%
  \let\\\LT@tabularcr\let\tabularnewline\\%
  \def\newpage{\noalign{\break}}%
  \def\pagebreak{\noalign{\ifnum`}=0\fi\@testopt{\LT@no@pgbk-}4}%
  \def\nopagebreak{\noalign{\ifnum`}=0\fi\@testopt\LT@no@pgbk4}%
  \let\hline\LT@hline \let\kill\LT@kill\let\caption\LT@caption
  \@tempdima\ht\strutbox
  \let\@endpbox\LT@endpbox
  \ifx\extrarowheight\@undefined
    \let\@acol\@tabacol
    \let\@classz\@tabclassz \let\@classiv\@tabclassiv
    \def\@startpbox{\vtop\LT@startpbox}%
    \let\@@startpbox\@startpbox
    \let\@@endpbox\@endpbox
    \let\LT@LL@FM@cr\@tabularcr
  \else
    \advance\@tempdima\extrarowheight
    \col@sep\tabcolsep
    \let\@startpbox\LT@startpbox\let\LT@LL@FM@cr\@arraycr
  \fi
  \setbox\@arstrutbox\hbox{\vrule
    \@height \arraystretch \@tempdima
    \@depth \arraystretch \dp \strutbox
    \@width \z@}%
  \let\@sharp##\let\protect\relax
   \begingroup
    \@mkpream{#2}%
    \xdef\LT@bchunk{%
       \global\advance\c@LT@chunks\@ne
       \global\LT@rows\z@\setbox\z@\vbox\bgroup
       \LT@setprevdepth
       \tabskip\LTleft \noexpand\halign to\hsize\bgroup
      \tabskip\z@ \@arstrut \@preamble \tabskip\LTright \cr}%
  \endgroup
  \expandafter\LT@nofcols\LT@bchunk&\LT@nofcols
  \LT@make@row
  \m@th\let\par\@empty
  \everycr{}\lineskip\z@\baselineskip\z@
  \LT@bchunk}
\def\LT@no@pgbk#1[#2]{\penalty #1\@getpen{#2}\ifnum`{=0\fi}}
\def\LT@start{%
  \let\LT@start\endgraf
  \endgraf\penalty\z@\vskip\LTpre
  \dimen@\pagetotal
  \advance\dimen@ \ht\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi
  \advance\dimen@ \dp\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi
  \advance\dimen@ \ht\LT@foot
  \dimen@ii\vfuzz
  \vfuzz\maxdimen
    \setbox\tw@\copy\z@
    \setbox\tw@\vsplit\tw@ to \ht\@arstrutbox
    \setbox\tw@\vbox{\unvbox\tw@}%
  \vfuzz\dimen@ii
  \advance\dimen@ \ht
        \ifdim\ht\@arstrutbox>\ht\tw@\@arstrutbox\else\tw@\fi
  \advance\dimen@\dp
        \ifdim\dp\@arstrutbox>\dp\tw@\@arstrutbox\else\tw@\fi
  \advance\dimen@ -\pagegoal
  \ifdim \dimen@>\z@\vfil\break\fi
      \global\@colroom\@colht
  \ifvoid\LT@foot\else
    \global\advance\vsize-\ht\LT@foot
    \global\advance\@colroom-\ht\LT@foot
    \dimen@\pagegoal\advance\dimen@-\ht\LT@foot\pagegoal\dimen@
    \maxdepth\z@
  \fi
  \ifvoid\LT@firsthead\copy\LT@head\else\box\LT@firsthead\fi\nobreak
  \output{\LT@output}}
\def\endlongtable{%
  \crcr
  \noalign{%
    \let\LT@entry\LT@entry@chop
    \xdef\LT@save@row{\LT@save@row}}%
  \LT@echunk
  \LT@start
  \unvbox\z@
  \LT@get@widths
  \if@filesw
    {\let\LT@entry\LT@entry@write\immediate\write\@auxout{%
      \gdef\expandafter\noexpand
        \csname LT@\romannumeral\c@LT@tables\endcsname
          {\LT@save@row}}}%
  \fi
  \ifx\LT@save@row\LT@@save@row
  \else
    \LT@warn{Column \@width s have changed\MessageBreak
             in table \thetable}%
    \LT@final@warn
  \fi
  \endgraf\penalty -\LT@end@pen
  \ifvoid\LT@foot\else
    \global\advance\vsize\ht\LT@foot
    \global\advance\@colroom\ht\LT@foot
    \dimen@\pagegoal\advance\dimen@\ht\LT@foot\pagegoal\dimen@
  \fi
  \endgroup
  \global\@mparbottom\z@
  \endgraf\penalty\z@\addvspace\LTpost
  \ifvoid\footins\else\insert\footins{}\fi}
\def\LT@nofcols#1&{%
  \futurelet\@let@token\LT@n@fcols}
\def\LT@n@fcols{%
  \advance\LT@cols\@ne
  \ifx\@let@token\LT@nofcols
    \expandafter\@gobble
  \else
    \expandafter\LT@nofcols
  \fi}
\def\LT@tabularcr{%
  \relax\iffalse{\fi\ifnum0=`}\fi
  \@ifstar
    {\def\crcr{\LT@crcr\noalign{\nobreak}}\let\cr\crcr
     \LT@t@bularcr}%
    {\LT@t@bularcr}}
\let\LT@crcr\crcr
\let\LT@setprevdepth\relax
\def\LT@t@bularcr{%
  \global\advance\LT@rows\@ne
  \ifnum\LT@rows=\LTchunksize
    \gdef\LT@setprevdepth{%
      \prevdepth\z@\global
      \global\let\LT@setprevdepth\relax}%
    \expandafter\LT@xtabularcr
  \else
    \ifnum0=`{}\fi
    \expandafter\LT@LL@FM@cr
  \fi}
\def\LT@xtabularcr{%
  \@ifnextchar[\LT@argtabularcr\LT@ntabularcr}
\def\LT@ntabularcr{%
  \ifnum0=`{}\fi
  \LT@echunk
  \LT@start
  \unvbox\z@
  \LT@get@widths
  \LT@bchunk}
\def\LT@argtabularcr[#1]{%
  \ifnum0=`{}\fi
  \ifdim #1>\z@
    \unskip\@xargarraycr{#1}%
  \else
    \@yargarraycr{#1}%
  \fi
  \LT@echunk
  \LT@start
  \unvbox\z@
  \LT@get@widths
  \LT@bchunk}
\def\LT@echunk{%
  \crcr\LT@save@row\cr\egroup
  \global\setbox\@ne\lastbox
    \unskip
  \egroup}
\def\LT@entry#1#2{%
  \ifhmode\@firstofone{&}\fi\omit
  \ifnum#1=\c@LT@chunks
  \else
    \kern#2\relax
  \fi}
\def\LT@entry@chop#1#2{%
  \noexpand\LT@entry
    {\ifnum#1>\c@LT@chunks
       1}{0pt%
     \else
       #1}{#2%
     \fi}}
\def\LT@entry@write{%
  \noexpand\LT@entry^^J%
  \@spaces}
\def\LT@kill{%
  \LT@echunk
  \LT@get@widths
  \expandafter\LT@rebox\LT@bchunk}
\def\LT@rebox#1\bgroup{%
  #1\bgroup
  \unvbox\z@
  \unskip
  \setbox\z@\lastbox}
\def\LT@blank@row{%
  \xdef\LT@save@row{\expandafter\LT@build@blank
    \romannumeral\number\LT@cols 001 }}
\def\LT@build@blank#1{%
  \if#1m%
    \noexpand\LT@entry{1}{0pt}%
    \expandafter\LT@build@blank
  \fi}
\def\LT@make@row{%
  \global\expandafter\let\expandafter\LT@save@row
    \csname LT@\romannumeral\c@LT@tables\endcsname
  \ifx\LT@save@row\relax
    \LT@blank@row
  \else
    {\let\LT@entry\or
     \if!%
         \ifcase\expandafter\expandafter\expandafter\LT@cols
         \expandafter\@gobble\LT@save@row
         \or
         \else
           \relax
         \fi
        !%
     \else
       \aftergroup\LT@blank@row
     \fi}%
  \fi}
\let\setlongtables\relax
\def\LT@get@widths{%
  \setbox\tw@\hbox{%
    \unhbox\@ne
    \let\LT@old@row\LT@save@row
    \global\let\LT@save@row\@empty
    \count@\LT@cols
    \loop
      \unskip
      \setbox\tw@\lastbox
    \ifhbox\tw@
      \LT@def@row
      \advance\count@\m@ne
    \repeat}%
  \ifx\LT@@save@row\@undefined
    \let\LT@@save@row\LT@save@row
  \fi}
\def\LT@def@row{%
  \let\LT@entry\or
  \edef\@tempa{%
    \ifcase\expandafter\count@\LT@old@row
    \else
      {1}{0pt}%
    \fi}%
  \let\LT@entry\relax
  \xdef\LT@save@row{%
    \LT@entry
    \expandafter\LT@max@sel\@tempa
    \LT@save@row}}
\def\LT@max@sel#1#2{%
  {\ifdim#2=\wd\tw@
     #1%
   \else
     \number\c@LT@chunks
   \fi}%
  {\the\wd\tw@}}
\def\LT@hline{%
  \noalign{\ifnum0=`}\fi
    \penalty\@M
    \futurelet\@let@token\LT@@hline}
\def\LT@@hline{%
  \ifx\@let@token\hline
    \global\let\@gtempa\@gobble
    \gdef\LT@sep{\penalty-\@medpenalty\vskip\doublerulesep}%
  \else
    \global\let\@gtempa\@empty
    \gdef\LT@sep{\penalty-\@lowpenalty\vskip-\arrayrulewidth}%
  \fi
  \ifnum0=`{\fi}%
  \multispan\LT@cols
     \unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr
  \noalign{\LT@sep}%
  \multispan\LT@cols
     \unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr
  \noalign{\penalty\@M}%
  \@gtempa}
\def\LT@caption{%
  \noalign\bgroup
    \@ifnextchar[{\egroup\LT@c@ption\@firstofone}\LT@capti@n}
\def\LT@c@ption#1[#2]#3{%
  \LT@makecaption#1\fnum@table{#3}%
  \def\@tempa{#2}%
  \ifx\@tempa\@empty\else
     {\let\\\space
     \addcontentsline{lot}{table}{\protect\numberline{\thetable}{#2}}}%
  \fi}
\def\LT@capti@n{%
  \@ifstar
    {\egroup\LT@c@ption\@gobble[]}%
    {\egroup\@xdblarg{\LT@c@ption\@firstofone}}}
\def\LT@makecaption#1#2#3{%
  \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{%
    \sbox\@tempboxa{#1{#2: }#3}%
    \ifdim\wd\@tempboxa>\hsize
      #1{#2: }#3%
    \else
      \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
    \fi
    \endgraf\vskip\baselineskip}%
  \hss}}}
\def\LT@output{%
  \ifnum\outputpenalty <-\@Mi
    \ifnum\outputpenalty > -\LT@end@pen
      \LT@err{floats and marginpars not allowed in a longtable}\@ehc
    \else
      \setbox\z@\vbox{\unvbox\@cclv}%
      \ifdim \ht\LT@lastfoot>\ht\LT@foot
        \dimen@\pagegoal
        \advance\dimen@\ht\LT@foot
        \advance\dimen@-\ht\LT@lastfoot
        \ifdim\dimen@<\ht\z@
          \setbox\@cclv\vbox{\unvbox\z@\copy\LT@foot\vss}%
          \@makecol
          \@outputpage
            \global\vsize\@colroom
          \setbox\z@\vbox{\box\LT@head}%
        \fi
      \fi
      \unvbox\z@\ifvoid\LT@lastfoot\copy\LT@foot\else\box\LT@lastfoot\fi
    \fi
  \else
    \setbox\@cclv\vbox{\unvbox\@cclv\copy\LT@foot\vss}%
    \@makecol
    \@outputpage
      \global\vsize\@colroom
    \copy\LT@head\nobreak
  \fi}
\def\LT@end@hd@ft#1{%
  \LT@echunk
  \ifx\LT@start\endgraf
    \LT@err
     {Longtable head or foot not at start of table}%
     {Increase LTchunksize}%
  \fi
  \setbox#1\box\z@
  \LT@get@widths
  \LT@bchunk}
\def\endfirsthead{\LT@end@hd@ft\LT@firsthead}
\def\endhead{\LT@end@hd@ft\LT@head}
\def\endfoot{\LT@end@hd@ft\LT@foot}
\def\endlastfoot{\LT@end@hd@ft\LT@lastfoot}
\def\LT@startpbox#1{%
  \bgroup
    \let\@footnotetext\LT@p@ftntext
    \setlength\hsize{#1}%
    \@arrayparboxrestore
    \vrule \@height \ht\@arstrutbox \@width \z@}
\def\LT@endpbox{%
  \@finalstrut\@arstrutbox
  \egroup
  \the\LT@p@ftn
  \global\LT@p@ftn{}%
  \hfil}
\def\LT@p@ftntext#1{%
  \edef\@tempa{\the\LT@p@ftn\noexpand\footnotetext[\the\c@footnote]}%
  \global\LT@p@ftn\expandafter{\@tempa{#1}}}%
\endinput
%%
%% End of file `longtable-patched.sty'.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Type running off page with Lattice & ggplot2 graphics using knitr, pandoc, Rmd, to PDF
       [not found]                         ` <20150212.060945.428913307.wl-mXXj517/zsQ@public.gmane.org>
@ 2015-02-12  5:11                           ` Werner LEMBERG
       [not found]                             ` <20150212.061118.303217439.wl-mXXj517/zsQ@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Werner LEMBERG @ 2015-02-12  5:11 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw, jgm-TVLZxgkOlNX2fBVCVOL8/A


> Due to license reasons, you should rename longtables.sty.  Attached
> is what I use instead.

Of course, you need a private `template.tex' also that contains

  \usepackage{longtable-patched}

instead of

  \usepackage{longtable}


    Werner


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Type running off page with Lattice & ggplot2 graphics using knitr, pandoc, Rmd, to PDF
       [not found]                             ` <20150212.061118.303217439.wl-mXXj517/zsQ@public.gmane.org>
@ 2015-02-15  2:31                               ` Branden Williams
  0 siblings, 0 replies; 9+ messages in thread
From: Branden Williams @ 2015-02-15  2:31 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw; +Cc: jgm-TVLZxgkOlNX2fBVCVOL8/A


[-- Attachment #1.1: Type: text/plain, Size: 1300 bytes --]

OK, so here's the latest. Thanks everyone for the suggestions.

I dropped the patched file 
into /usr/local/texlive/2014basic/texmf-dist/tex/latex/tools 
and /usr/local/texlive/2014/texmf-dist/tex/latex/tools/, renaming the 
original, as I was not sure which one was the right one. I'm getting much 
closer! So far, all of the graphs are OK except for one xyplot() that for 
whatever reason starts about 2 inches above the bottom of the page and 
paints under the page number while running off the screen. This page also 
has a ggplot graphic as well as a pander table, while simultaneously 
dropping about 50 words of text. 

Was there an issue with the patched template when you have stuff before and 
after the pandoc table?

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c24a6265-ff32-4e50-a44c-32591d8d6b14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1766 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-02-15  2:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-10 16:51 Type running off page with Lattice & ggplot2 graphics using knitr, pandoc, Rmd, to PDF Branden Williams
     [not found] ` <01621721-7aae-4575-9ea2-aaa0e23d2bb0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-02-10 19:47   ` John MacFarlane
     [not found]     ` <20150210194745.GB17792-0VdLhd/A9Pm0ooXD8Eul3fVEzZTyCGbZTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
2015-02-10 21:03       ` Branden Williams
     [not found]         ` <14ff2902-cd94-4ae8-a9ea-60d7f4fcf137-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-02-11  1:08           ` John MacFarlane
     [not found]             ` <20150211010834.GG42246-qqGlgsTyhTiCiGiXOSDXzOeaTW2qgoyBqqGlgsTyhTjVYgS9aZXmwmsbx8vYGeVslXN7HHkbuXM@public.gmane.org>
2015-02-11 17:55               ` Branden Williams
     [not found]                 ` <24f742da-889e-4aa8-9773-771fe3a4774a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-02-11 19:25                   ` John MacFarlane
     [not found]                     ` <20150211192502.GA11303-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
2015-02-12  5:09                       ` Werner LEMBERG
     [not found]                         ` <20150212.060945.428913307.wl-mXXj517/zsQ@public.gmane.org>
2015-02-12  5:11                           ` Werner LEMBERG
     [not found]                             ` <20150212.061118.303217439.wl-mXXj517/zsQ@public.gmane.org>
2015-02-15  2:31                               ` Branden Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).