all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Blank page in LaTeX/PDF output
@ 2014-02-28 16:59 Peter Davis
  2014-02-28 17:03 ` John Hendy
  0 siblings, 1 reply; 24+ messages in thread
From: Peter Davis @ 2014-02-28 16:59 UTC (permalink / raw)
  To: emacs-orgmode


I'm writing a short paper containing tables, images, etc., but I'm 
getting a blank page in the PDF output. That is, it's completely blank 
*except* for the page number.

Any suggestions on how to trouble-shoot or fix this?

If I could get rid of the page number on the blank page, I would just 
delete the page in Acrobat, but as it is, that would leave pages 1-5, 7-9.

Thanks!

-pd

-- 
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: Blank page in LaTeX/PDF output
  2014-02-28 16:59 Blank page in LaTeX/PDF output Peter Davis
@ 2014-02-28 17:03 ` John Hendy
  2014-02-28 17:26   ` Peter Davis
  0 siblings, 1 reply; 24+ messages in thread
From: John Hendy @ 2014-02-28 17:03 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

On Fri, Feb 28, 2014 at 10:59 AM, Peter Davis <pfd@pfdstudio.com> wrote:
>
> I'm writing a short paper containing tables, images, etc., but I'm getting a
> blank page in the PDF output. That is, it's completely blank *except* for
> the page number.
>
> Any suggestions on how to trouble-shoot or fix this?

Probably related to image/table float placement. I've had an image on
one page trigger a blank page after it, and if your options or the
size of the image on the next place won't fit on a single page, it
might be skipping that blank one entirely and moving along to the
next.

Is it possible to share the document, or could you try to copy that
.org file, remove the contents of p. 1-4 and 8-9, and then share the
.org file that generates pages 5, 6 (blank), and 7?


John

>
> If I could get rid of the page number on the blank page, I would just delete
> the page in Acrobat, but as it is, that would leave pages 1-5, 7-9.
>
> Thanks!
>
> -pd
>
> --
> Peter Davis
> The Tech Curmudgeon
> www.techcurmudgeon.com
>
>

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

* Re: Blank page in LaTeX/PDF output
  2014-02-28 17:03 ` John Hendy
@ 2014-02-28 17:26   ` Peter Davis
  2014-02-28 17:36     ` Peter Davis
                       ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Peter Davis @ 2014-02-28 17:26 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]


On 2/28/14, 12:03 PM, John Hendy wrote:
> On Fri, Feb 28, 2014 at 10:59 AM, Peter Davis <pfd@pfdstudio.com> wrote:
>> I'm writing a short paper containing tables, images, etc., but I'm getting a
>> blank page in the PDF output. That is, it's completely blank *except* for
>> the page number.
>>
>> Any suggestions on how to trouble-shoot or fix this?
> Probably related to image/table float placement. I've had an image on
> one page trigger a blank page after it, and if your options or the
> size of the image on the next place won't fit on a single page, it
> might be skipping that blank one entirely and moving along to the
> next.
>
> Is it possible to share the document, or could you try to copy that
> .org file, remove the contents of p. 1-4 and 8-9, and then share the
> .org file that generates pages 5, 6 (blank), and 7?

Thanks, John. I figured it has something to do with LaTeX float 
behavior, but I'm trying to understand how to control it through 
org-mode. I'm attaching a small sample that reproduces the problem.

Thanks!
-pd

-- 
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com


[-- Attachment #2: blank-page-bug.org --]
[-- Type: text/plain, Size: 2858 bytes --]

#+STARTUP: showeverything logdone
#+options: num:nil
#+OPTIONS:   H:5 num:t \n:nil @:t ::t |:t ^:nil -:t f:t *:t <:t
#+LaTeX_CLASS: koma-article
#+LATEX_HEADER: \setlength{\parskip}{2ex plus 4pt minus 2pt}
#+LATEX_HEADER: \setlength{\parindent}{0pt}
#+LATEX_HEADER: \renewcommand{\baselinestretch}{1.0}
#+LATEX_HEADER: \setlength{\topsep}{-10pt}
#+LATEX_HEADER: \setlength{\partopsep}{0pt}
#+LaTeX_CLASS_OPTIONS: [article,letterpaper,times,12pt,listings-bw,microtype]
#+author: Peter Davis (pdavis)
#+title: My Title

#+ATTR_LATEX: :height 5in
[[/Users/peterdavis/Dropbox/Tufts/COMP171/force_a_page_break.png]]

#+ATTR_LATEX: :height 6cm
[[/Users/peterdavis/Dropbox/Tufts/COMP171/AS3_2.png]]

/NOTE:/ User actions are indicated in lowercase letters. Software responses are indicated in UPPERCASE LETTERS.

* Lexical Analysis

The following table contains the word "blah" a lot.

#+CAPTION:
#+ATTR_LATEX: :align lp{2.75in}p{2.75in}
|----------------+----------------------------------------------------------+-------------------------------------------------------------------------|
| *blah*         | *blah blah blah*                                         | *blah blah blah blah*                                                   |
|----------------+----------------------------------------------------------+-------------------------------------------------------------------------|
| blah           | blah blah blah                                           | blah blah blah blah                                                     |
| blah           | blah blah blah                                           | blah blah blah blah                                                     |
| blah           | blah blah blah                                           | blah blah blah blah                                                     |
| blah           | blah blah blah                                           | blah blah blah blah                                                     |
| blah           | blah blah blah                                           | blah blah blah blah                                                     |
| blah           | blah blah blah                                           | blah blah blah blah                                                     |
| blah           | blah blah blah                                           | blah blah blah blah                                                     |
| blah           | blah blah blah                                           | blah blah blah blah                                                     |
|----------------+----------------------------------------------------------+-------------------------------------------------------------------------|

* Storyboard

#+ATTR_LATEX: :height 8.5in
[[/Users/peterdavis/Dropbox/Tufts/COMP171/Storyboard.png]]


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

* Re: Blank page in LaTeX/PDF output
  2014-02-28 17:26   ` Peter Davis
@ 2014-02-28 17:36     ` Peter Davis
  2014-02-28 17:37     ` John Hendy
  2014-03-01  0:38     ` Nick Dokos
  2 siblings, 0 replies; 24+ messages in thread
From: Peter Davis @ 2014-02-28 17:36 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode


On 2/28/14, 12:26 PM, Peter Davis wrote:
>
> Thanks, John. I figured it has something to do with LaTeX float 
> behavior, but I'm trying to understand how to control it through 
> org-mode. I'm attaching a small sample that reproduces the problem.
>

I'd also like to get rid of that stupid empty table of contents, which 
may in itself solve the problem.

Thanks!
-pd


-- 
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: Blank page in LaTeX/PDF output
  2014-02-28 17:26   ` Peter Davis
  2014-02-28 17:36     ` Peter Davis
@ 2014-02-28 17:37     ` John Hendy
  2014-02-28 18:19       ` Peter Davis
  2014-03-01  0:38     ` Nick Dokos
  2 siblings, 1 reply; 24+ messages in thread
From: John Hendy @ 2014-02-28 17:37 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

On Fri, Feb 28, 2014 at 11:26 AM, Peter Davis <pfd@pfdstudio.com> wrote:
>
> On 2/28/14, 12:03 PM, John Hendy wrote:
>>
>> On Fri, Feb 28, 2014 at 10:59 AM, Peter Davis <pfd@pfdstudio.com> wrote:
>>>
>>> I'm writing a short paper containing tables, images, etc., but I'm
>>> getting a
>>> blank page in the PDF output. That is, it's completely blank *except* for
>>> the page number.
>>>
>>> Any suggestions on how to trouble-shoot or fix this?
>>
>> Probably related to image/table float placement. I've had an image on
>> one page trigger a blank page after it, and if your options or the
>> size of the image on the next place won't fit on a single page, it
>> might be skipping that blank one entirely and moving along to the
>> next.
>>
>> Is it possible to share the document, or could you try to copy that
>> .org file, remove the contents of p. 1-4 and 8-9, and then share the
>> .org file that generates pages 5, 6 (blank), and 7?
>
>
> Thanks, John. I figured it has something to do with LaTeX float behavior,
> but I'm trying to understand how to control it through org-mode. I'm
> attaching a small sample that reproduces the problem.

I was going to try and get back to you quickly, but I don't have
koma-article defined and don't have the images you're using, so I
won't be much help to you. Intuitively, I'd suggest you try playing
with the image sizes to see if you can shrink them and make the
problem go away.

You can also try:

#+latex: \scriptsize % or \small, \footnotesize, or \tiny

before your table to make it smaller as well if you think that's contributing.

Just saw your other email come in, and the TOC will be fixed by
modifying your existing options at the top of the document:

#+options: num:nil toc:nil


Best regards,
John

>
> Thanks!
> -pd
>
> --
> Peter Davis
> The Tech Curmudgeon
> www.techcurmudgeon.com
>

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

* Re: Blank page in LaTeX/PDF output
  2014-02-28 17:37     ` John Hendy
@ 2014-02-28 18:19       ` Peter Davis
  2014-02-28 18:32         ` Peter Davis
  0 siblings, 1 reply; 24+ messages in thread
From: Peter Davis @ 2014-02-28 18:19 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode


On 2/28/14, 12:37 PM, John Hendy wrote:
> I was going to try and get back to you quickly, but I don't have
> koma-article defined and don't have the images you're using, so I
> won't be much help to you. Intuitively, I'd suggest you try playing
> with the image sizes to see if you can shrink them and make the
> problem go away.

Thanks, John. You shouldn't need the images, since their heights are 
specified in the .org file. But I guess it would not be reproducible 
without koma-article.

>
> You can also try:
>
> #+latex: \scriptsize % or \small, \footnotesize, or \tiny
>
> before your table to make it smaller as well if you think that's contributing.

These seem like things to try after the content is completely locked 
down. Any edits after this could conceivably re-introduce the problem, 
requiring further tweaks.

> Just saw your other email come in, and the TOC will be fixed by
> modifying your existing options at the top of the document:
>
> #+options: num:nil toc:nil

Thanks again! Yes, this works, and seems to eliminate the blank page 
(for now)!

Cheers,
-pd

-- 
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: Blank page in LaTeX/PDF output
  2014-02-28 18:19       ` Peter Davis
@ 2014-02-28 18:32         ` Peter Davis
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Davis @ 2014-02-28 18:32 UTC (permalink / raw)
  To: emacs-orgmode


On 2/28/14, 1:19 PM, Peter Davis wrote:
>
> On 2/28/14, 12:37 PM, John Hendy wrote:
>> You can also try:
>>
>> #+latex: \scriptsize % or \small, \footnotesize, or \tiny
>>
>> before your table to make it smaller as well if you think that's 
>> contributing.
>
> These seem like things to try after the content is completely locked 
> down. Any edits after this could conceivably re-introduce the problem, 
> requiring further tweaks.
>

I just found that adding or removing "num:nil" from the #+options: 
changes whether or not the blank page appears. I would have thought 
header numbering only affects horizontal line length (None of the 
headers wrap to more than one line), but apparently I'm wrong. Setting 
"toc:nil" got rid of the blank page, but removing "num:nil" 
re-introduced it.

Weird.

Thanks!
-pd

-- 
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: Blank page in LaTeX/PDF output
  2014-02-28 17:26   ` Peter Davis
  2014-02-28 17:36     ` Peter Davis
  2014-02-28 17:37     ` John Hendy
@ 2014-03-01  0:38     ` Nick Dokos
  2014-03-01  1:21       ` Peter Davis
  2 siblings, 1 reply; 24+ messages in thread
From: Nick Dokos @ 2014-03-01  0:38 UTC (permalink / raw)
  To: emacs-orgmode

Peter Davis <pfd@pfdstudio.com> writes:

> On 2/28/14, 12:03 PM, John Hendy wrote:
>> On Fri, Feb 28, 2014 at 10:59 AM, Peter Davis <pfd@pfdstudio.com> wrote:
>>> I'm writing a short paper containing tables, images, etc., but I'm getting a
>>> blank page in the PDF output. That is, it's completely blank *except* for
>>> the page number.
>>>
>>> Any suggestions on how to trouble-shoot or fix this?
>> Probably related to image/table float placement. I've had an image on
>> one page trigger a blank page after it, and if your options or the
>> size of the image on the next place won't fit on a single page, it
>> might be skipping that blank one entirely and moving along to the
>> next.
>>
>> Is it possible to share the document, or could you try to copy that
>> .org file, remove the contents of p. 1-4 and 8-9, and then share the
>> .org file that generates pages 5, 6 (blank), and 7?
>
> Thanks, John. I figured it has something to do with LaTeX float
> behavior, but I'm trying to understand how to control it through
> org-mode. I'm attaching a small sample that reproduces the problem.
>
> Thanks!
> -pd

John is correct, I think, although latex's behavior in leaving an empty
page does not make much sense to me. Nevertheless, when I reduce
the height of the last image to less than about 7.85 inches, the empty
page goes away. AFAICT, num: and toc: settings do not affect this
behavior.

-- 
Nick

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

* Re: Blank page in LaTeX/PDF output
  2014-03-01  0:38     ` Nick Dokos
@ 2014-03-01  1:21       ` Peter Davis
  2014-03-01  1:27         ` John Hendy
                           ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Peter Davis @ 2014-03-01  1:21 UTC (permalink / raw)
  To: emacs-orgmode


On 2/28/14, 7:38 PM, Nick Dokos wrote:
> John is correct, I think, although latex's behavior in leaving an empty
> page does not make much sense to me. Nevertheless, when I reduce
> the height of the last image to less than about 7.85 inches, the empty
> page goes away. AFAICT, num: and toc: settings do not affect this
> behavior.
>

Thanks, Nick, but I have confirmed that adding num:nil eliminates the 
blank page, and removing that re-introduces the blank page. No other 
changes to the .org file were made. I was wondering if LaTeX has some 
predisposition to handle numbered section headings differently from 
unnumbered ones as far as pagination.

I'll try to make a simple, clean sample that reproduces it, but it's 
going to take some trial-and-error testing.

-pd

-- 
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: Blank page in LaTeX/PDF output
  2014-03-01  1:21       ` Peter Davis
@ 2014-03-01  1:27         ` John Hendy
  2014-03-01 13:01           ` Nick Dokos
  2014-03-01  1:30         ` Peter Davis
  2014-03-01 14:42         ` Nick Dokos
  2 siblings, 1 reply; 24+ messages in thread
From: John Hendy @ 2014-03-01  1:27 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]

On Feb 28, 2014 7:21 PM, "Peter Davis" <pfd@pfdstudio.com> wrote:
>
>
> On 2/28/14, 7:38 PM, Nick Dokos wrote:
>>
>> John is correct, I think, although latex's behavior in leaving an empty
>> page does not make much sense to me. Nevertheless, when I reduce
>> the height of the last image to less than about 7.85 inches, the empty
>> page goes away. AFAICT, num: and toc: settings do not affect this
>> behavior.
>>
>
> Thanks, Nick, but I have confirmed that adding num:nil eliminates the
blank page, and removing that re-introduces the blank page. No other
changes to the .org file were made. I was wondering if LaTeX has some
predisposition to handle numbered section headings differently from
unnumbered ones as far as pagination.
>
> I'll try to make a simple, clean sample that reproduces it, but it's
going to take some trial-and-error testing.

If you could include a minimal Emacs config as well, that would help others
reproduce easier to help figure out what's going on.

John

>
> -pd
>
> --
> ----
>
> Peter Davis
> The Tech Curmudgeon
> www.techcurmudgeon.com
>
>

[-- Attachment #2: Type: text/html, Size: 1497 bytes --]

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

* Re: Blank page in LaTeX/PDF output
  2014-03-01  1:21       ` Peter Davis
  2014-03-01  1:27         ` John Hendy
@ 2014-03-01  1:30         ` Peter Davis
  2014-03-01  3:32           ` Nick Dokos
  2014-03-01 14:42         ` Nick Dokos
  2 siblings, 1 reply; 24+ messages in thread
From: Peter Davis @ 2014-03-01  1:30 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1236 bytes --]

Attached is a simple file that demonstrates this. As is, it does not 
leave a blank page. But if you remove the num:nil option from the second 
line of this file, you do get a blank page.

You (probably) need koma-article class for this. (I didn't install 
anything. It just worked for me.) You don't need the images.

-pd

On 2/28/14, 8:21 PM, Peter Davis wrote:
>
> On 2/28/14, 7:38 PM, Nick Dokos wrote:
>> John is correct, I think, although latex's behavior in leaving an empty
>> page does not make much sense to me. Nevertheless, when I reduce
>> the height of the last image to less than about 7.85 inches, the empty
>> page goes away. AFAICT, num: and toc: settings do not affect this
>> behavior.
>>
>
> Thanks, Nick, but I have confirmed that adding num:nil eliminates the 
> blank page, and removing that re-introduces the blank page. No other 
> changes to the .org file were made. I was wondering if LaTeX has some 
> predisposition to handle numbered section headings differently from 
> unnumbered ones as far as pagination.
>
> I'll try to make a simple, clean sample that reproduces it, but it's 
> going to take some trial-and-error testing.
>
> -pd
>

-- 
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com


[-- Attachment #2: blank-page-bug.org --]
[-- Type: text/plain, Size: 2738 bytes --]

#+STARTUP: showeverything logdone
#+options: num:nil toc:nil

#+LaTeX_CLASS: koma-article
#+LATEX_HEADER: \setlength{\parskip}{2ex plus 4pt minus 2pt}
#+LATEX_HEADER: \setlength{\parindent}{0pt}
#+LATEX_HEADER: \renewcommand{\baselinestretch}{1.0}
#+LATEX_HEADER: \setlength{\topsep}{-10pt}
#+LATEX_HEADER: \setlength{\partopsep}{0pt}
#+LaTeX_CLASS_OPTIONS: [article,letterpaper,times,12pt,listings-bw,microtype]
#+author: Peter Davis (pdavis)
#+title: My Title

#+ATTR_LATEX: :height 6in
[[/Users/peterdavis/force_a_page_break.png]]

#+ATTR_LATEX: :height 6cm
[[/Users/peterdavis/AS3_2.png]]

/NOTE:/ User actio]ns are indicated in lowercase letters. Software responses are indicated in UPPERCASE LETTERS.

* Lexical Analysis

The following table contains the word "blah" a lot.

#+CAPTION:
#+ATTR_LATEX: :align lp{2.75in}p{2.75in}
|----------------+----------------------------------------------------------+-------------------------------------------------------------------------|
| *blah*         | *blah blah blah*                                         | *blah blah blah blah*                                                   |
|----------------+----------------------------------------------------------+-------------------------------------------------------------------------|
| blah           | blah blah blah                                           | blah blah blah blah                                                     |
| blah           | blah blah blah                                           | blah blah blah blah                                                     |
| blah           | blah blah blah                                           | blah blah blah blah                                                     |
| blah           | blah blah blah                                           | blah blah blah blah                                                     |
| blah           | blah blah blah                                           | blah blah blah blah                                                     |
| blah           | blah blah blah                                           | blah blah blah blah                                                     |
| blah           | blah blah blah                                           | blah blah blah blah                                                     |
| blah           | blah blah blah                                           | blah blah blah blah                                                     |
|----------------+----------------------------------------------------------+-------------------------------------------------------------------------|

* Storyboard

#+ATTR_LATEX: :height 8.5in
[[/Users/peterdavis/tall_image.png]]


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

* Re: Blank page in LaTeX/PDF output
  2014-03-01  1:30         ` Peter Davis
@ 2014-03-01  3:32           ` Nick Dokos
  2014-03-01  3:39             ` Peter Davis
  0 siblings, 1 reply; 24+ messages in thread
From: Nick Dokos @ 2014-03-01  3:32 UTC (permalink / raw)
  To: emacs-orgmode

Peter Davis <pfd@pfdstudio.com> writes:

> Attached is a simple file that demonstrates this. As is, it does not
> leave a blank page. But if you remove the num:nil option from the
> second line of this file, you do get a blank page.
>

Not for me: in both cases, I get a blank page 3.

> You (probably) need koma-article class for this. (I didn't install
> anything. It just worked for me.) You don't need the images.
>

You need *some* images in order to compile it. I just replaced all
the image links with

[[./foo.png]]

where foo.png is the emacs logo.

And my koma-article is a copy of the article class, except the document class
is "scrartcl" instead of "article".

> -pd
>

> On 2/28/14, 8:21 PM, Peter Davis wrote:
>>
>> On 2/28/14, 7:38 PM, Nick Dokos wrote:
>>> John is correct, I think, although latex's behavior in leaving an empty
>>> page does not make much sense to me. Nevertheless, when I reduce
>>> the height of the last image to less than about 7.85 inches, the empty
>>> page goes away. AFAICT, num: and toc: settings do not affect this
>>> behavior.
>>>
>>
>> Thanks, Nick, but I have confirmed that adding num:nil eliminates
>> the blank page, and removing that re-introduces the blank page. No
>> other changes to the .org file were made. I was wondering if LaTeX
>> has some predisposition to handle numbered section headings
>> differently from unnumbered ones as far as pagination.
>>
>> I'll try to make a simple, clean sample that reproduces it, but it's
>> going to take some trial-and-error testing.
>>
>> -pd
>>

-- 
Nick

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

* Re: Blank page in LaTeX/PDF output
  2014-03-01  3:32           ` Nick Dokos
@ 2014-03-01  3:39             ` Peter Davis
  2014-03-01  5:27               ` John Hendy
  0 siblings, 1 reply; 24+ messages in thread
From: Peter Davis @ 2014-03-01  3:39 UTC (permalink / raw)
  To: emacs-orgmode


On 2/28/14, 10:32 PM, Nick Dokos wrote:
> Peter Davis <pfd@pfdstudio.com> writes:
>
>> Attached is a simple file that demonstrates this. As is, it does not
>> leave a blank page. But if you remove the num:nil option from the
>> second line of this file, you do get a blank page.
>>
> Not for me: in both cases, I get a blank page 3.
Interesting. I wonder what's different in our setups.

>> You (probably) need koma-article class for this. (I didn't install
>> anything. It just worked for me.) You don't need the images.
>>
> You need *some* images in order to compile it. I just replaced all
> the image links with
>
> [[./foo.png]]

I did not need any images. In fact, the version I posted I had just 
tested, and the image links in there are completely bogus. I just get 
empty boxes of the height I specified.

> where foo.png is the emacs logo.
>
> And my koma-article is a copy of the article class, except the document class
> is "scrartcl" instead of "article".

I don't know where that came from. I can post my copy of koma-article, 
if that would help.

-pd

-- 
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: Blank page in LaTeX/PDF output
  2014-03-01  3:39             ` Peter Davis
@ 2014-03-01  5:27               ` John Hendy
  2014-03-01 12:47                 ` Nick Dokos
  0 siblings, 1 reply; 24+ messages in thread
From: John Hendy @ 2014-03-01  5:27 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

On Fri, Feb 28, 2014 at 9:39 PM, Peter Davis <pfd@pfdstudio.com> wrote:
>
> On 2/28/14, 10:32 PM, Nick Dokos wrote:
>>
>> Peter Davis <pfd@pfdstudio.com> writes:
>>
>>> Attached is a simple file that demonstrates this. As is, it does not
>>> leave a blank page. But if you remove the num:nil option from the
>>> second line of this file, you do get a blank page.
>>>
>> Not for me: in both cases, I get a blank page 3.
>
> Interesting. I wonder what's different in our setups.
>
>
>>> You (probably) need koma-article class for this. (I didn't install
>>> anything. It just worked for me.) You don't need the images.
>>>
>> You need *some* images in order to compile it. I just replaced all
>> the image links with
>>
>> [[./foo.png]]
>
>
> I did not need any images. In fact, the version I posted I had just tested,
> and the image links in there are completely bogus. I just get empty boxes of
> the height I specified.
>
>
>> where foo.png is the emacs logo.
>>
>> And my koma-article is a copy of the article class, except the document
>> class
>> is "scrartcl" instead of "article".
>
>
> I don't know where that came from. I can post my copy of koma-article, if
> that would help.

We really need a minimal config, in my opinion. I just tried fiddling
again and am having no luck after installing koma-script from CTAN (or
is that even something I need?) and adding =(require 'ox-koma-letter)=
to my emacs config (again, is that even needed?). I don't use koma, so
I'm lost as to how to get anything usable from your document in order
to troubleshoot.


John

>
>
> -pd
>
> --
> ----
> Peter Davis
> The Tech Curmudgeon
> www.techcurmudgeon.com
>
>

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

* Re: Blank page in LaTeX/PDF output
  2014-03-01  5:27               ` John Hendy
@ 2014-03-01 12:47                 ` Nick Dokos
  2014-03-01 14:48                   ` Peter Davis
  0 siblings, 1 reply; 24+ messages in thread
From: Nick Dokos @ 2014-03-01 12:47 UTC (permalink / raw)
  To: emacs-orgmode

John Hendy <jw.hendy@gmail.com> writes:

> On Fri, Feb 28, 2014 at 9:39 PM, Peter Davis <pfd@pfdstudio.com> wrote:
>>
>> On 2/28/14, 10:32 PM, Nick Dokos wrote:
>>>
>>> You need *some* images in order to compile it. I just replaced all
>>> the image links with
>>>
>>> [[./foo.png]]
>>
>>
>> I did not need any images. In fact, the version I posted I had just tested,
>> and the image links in there are completely bogus. I just get empty boxes of
>> the height I specified.
>>

Indeed - I first tried it by hand, running pdflatex on the command line and
got what I thought were errors, but they were warnings only: I hit RET
to continue past them and got the same empty boxes you got. And doing
C-c C-e l o to go straight to PDF does the same thing.

>>
>>> where foo.png is the emacs logo.
>>>
>>> And my koma-article is a copy of the article class, except the document
>>> class
>>> is "scrartcl" instead of "article".
>>
>>
>> I don't know where that came from. I can post my copy of koma-article, if
>> that would help.
>
> We really need a minimal config, in my opinion. I just tried fiddling
> again and am having no luck after installing koma-script from CTAN (or
> is that even something I need?) and adding =(require 'ox-koma-letter)=
> to my emacs config (again, is that even needed?). I don't use koma, so
> I'm lost as to how to get anything usable from your document in order
> to troubleshoot.
>
>
No, you don't need ox-koma-letter at all. You do need to have
the "scrartcl" class from koma-script installed - check with
kpsewhich - I get:

,----
| $ kpsewhich scrartcl.cls
| /usr/share/texmf-texlive/tex/latex/koma-script/scrartcl.cls
`----

and you need to have a "koma-article" class added to org-latex-classes.
Here's what I used, but Peter may have a different definition
(something must explain why we get different results!):

--8<---------------cut here---------------start------------->8---
(setq koma-article-class
      '("koma-article"
	"\\documentclass[11pt]{scrartcl}"
	("\\section{%s}" . "\\section*{%s}")
	("\\subsection{%s}" . "\\subsection*{%s}")
	("\\subsubsection{%s}" . "\\subsubsection*{%s}")
	("\\paragraph{%s}" . "\\paragraph*{%s}")
	("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

(progn
  (require 'ox-latex)
  (add-to-list 'org-latex-classes koma-article-class t))
--8<---------------cut here---------------end--------------->8---

-- 
Nick

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

* Re: Blank page in LaTeX/PDF output
  2014-03-01  1:27         ` John Hendy
@ 2014-03-01 13:01           ` Nick Dokos
  0 siblings, 0 replies; 24+ messages in thread
From: Nick Dokos @ 2014-03-01 13:01 UTC (permalink / raw)
  To: emacs-orgmode

John Hendy <jw.hendy@gmail.com> writes:

> If you could include a minimal Emacs config as well, that would help
> others reproduce easier to help figure out what's going on.
>

One more thing (for Peter): if you could produce the tex file and
pdflatex it by hand, can you also post the log file it produces
somewhere? If it's too big for the list, maybe pastebin it somewhere?

-- 
Nick

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

* Re: Blank page in LaTeX/PDF output
  2014-03-01  1:21       ` Peter Davis
  2014-03-01  1:27         ` John Hendy
  2014-03-01  1:30         ` Peter Davis
@ 2014-03-01 14:42         ` Nick Dokos
  2 siblings, 0 replies; 24+ messages in thread
From: Nick Dokos @ 2014-03-01 14:42 UTC (permalink / raw)
  To: emacs-orgmode

Peter Davis <pfd@pfdstudio.com> writes:

> On 2/28/14, 7:38 PM, Nick Dokos wrote:
>> John is correct, I think, although latex's behavior in leaving an empty
>> page does not make much sense to me. Nevertheless, when I reduce
>> the height of the last image to less than about 7.85 inches, the empty
>> page goes away. AFAICT, num: and toc: settings do not affect this
>> behavior.
>>
>
> Thanks, Nick, but I have confirmed that adding num:nil eliminates the
> blank page, and removing that re-introduces the blank page. No other
> changes to the .org file were made. I was wondering if LaTeX has some
> predisposition to handle numbered section headings differently from
> unnumbered ones as far as pagination.
>
> I'll try to make a simple, clean sample that reproduces it, but it's
> going to take some trial-and-error testing.
>

Nevertheless, can you please reduce the size of the last image to 7.8in
and see whether the empty page goes away?

Nick

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

* Re: Blank page in LaTeX/PDF output
  2014-03-01 12:47                 ` Nick Dokos
@ 2014-03-01 14:48                   ` Peter Davis
  2014-03-01 19:19                     ` John Hendy
  0 siblings, 1 reply; 24+ messages in thread
From: Peter Davis @ 2014-03-01 14:48 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 267 bytes --]


Here are the two LaTeX files. The only differences, apart from creation 
time, are the the use of \section* instead of \section, so perhaps this 
is a LaTeX bug.

Anyone know how to report that?

-pd

-- 
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com


[-- Attachment #2: no-blank-page-bug.tex --]
[-- Type: application/x-tex, Size: 2048 bytes --]

[-- Attachment #3: blank-page-bug.tex --]
[-- Type: application/x-tex, Size: 2046 bytes --]

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

* Re: Blank page in LaTeX/PDF output
  2014-03-01 14:48                   ` Peter Davis
@ 2014-03-01 19:19                     ` John Hendy
  2014-03-04  0:51                       ` Peter Davis
  0 siblings, 1 reply; 24+ messages in thread
From: John Hendy @ 2014-03-01 19:19 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2998 bytes --]

I can confirm Peter's results, and also took a stab at improving the
reproducibility. I used his the file provided here, saving as two
different .org files, "numbered-min.org" and "un-numbered-min.org":
- http://lists.gnu.org/archive/html/emacs-orgmode/2014-02/msg01035.html

The only differences between these two lines is in the #+options line.
- numbered-min.org contains #+options: num:t toc:nil
- un-numbered-min.org contains #+options: num:nil toc:nil

I used `emacs -Q`, and then `M-x load-file`, followed by loading this
minimal config:

#+begin_src min-config

;; change to your org path!
(add-to-list 'load-path "~/.elisp/org.git/lisp/")
(add-to-list 'load-path "~/.elisp/org.git/contrib/lisp")

(setq koma-article-class
      '("koma-article"
        "\\documentclass[11pt]{scrartcl}"
        ("\\section{%s}" . "\\section*{%s}")
        ("\\subsection{%s}" . "\\subsection*{%s}")
        ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
        ("\\paragraph{%s}" . "\\paragraph*{%s}")
        ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

(progn
  (require 'ox-latex)
  (add-to-list 'org-latex-classes koma-article-class t))

#+end_src

Files were exported as usual with `C-c C-e l p` for LaTeX/pdf output.

Here's a pastebin of the result I get from using diff --side-by-side
on the two .tex files when using num:t vs. num:nil in Org:
- http://pastebin.com/wkKYWhb7

The only difference is \section{} vs. \section*{}.

Here's a diff of the latex output:
- http://pastebin.com/vsZH2Hnf

Other than the file names, the only differences are the page numbers
where overfull errors occur. Even the *sizes* of the overfull \hbox
and \vbox errors are identical. In the un-numbered version, the error
references page [2], and in the numbered it mentions pages [2] [3].
(Refer to the pastebin link above to track down any other
discrepancies.)

PDFs from each are attached. For me, 7.8in with numbered sections
results in 3 pages, while 7.9in results in 4 pages with a blank 3rd
page. It's very odd to me that un-numbered would allow 8.5in to not
roll onto the next page, while it actually takes 7.8in to get it to
fit on the numbered version. That's a huge difference, and intuitively
I would have figured we stumbled on some sort of very small boundary
condition, not something that requires a 0.7in difference to fix.

I searched things like "latex page break 'section*' vs section" with
no obvious lead on why the two section styles would be different.
Regarding a bug report, if that's what this is, I just googled "latex
bugs" and got this page as the first hit:
- http://latex-project.org/bugs.html


Best regards,
John


On Sat, Mar 1, 2014 at 8:48 AM, Peter Davis <pfd@pfdstudio.com> wrote:
>
> Here are the two LaTeX files. The only differences, apart from creation
> time, are the the use of \section* instead of \section, so perhaps this is a
> LaTeX bug.
>
> Anyone know how to report that?
>
> -pd
>
> --
> ----
> Peter Davis
> The Tech Curmudgeon
> www.techcurmudgeon.com
>

[-- Attachment #2: numbered-min.pdf --]
[-- Type: application/pdf, Size: 101702 bytes --]

[-- Attachment #3: un-numbered-min.pdf --]
[-- Type: application/pdf, Size: 100870 bytes --]

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

* Re: Blank page in LaTeX/PDF output
  2014-03-01 19:19                     ` John Hendy
@ 2014-03-04  0:51                       ` Peter Davis
  2014-03-04  1:08                         ` John Hendy
  0 siblings, 1 reply; 24+ messages in thread
From: Peter Davis @ 2014-03-04  0:51 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode


On Sat, Mar 1, 2014, at 02:19 PM, John Hendy wrote:
> I can confirm Peter's results, ...

Thanks, John.

> 
> I searched things like "latex page break 'section*' vs section" with
> no obvious lead on why the two section styles would be different.
> Regarding a bug report, if that's what this is, I just googled "latex
> bugs" and got this page as the first hit:
> - http://latex-project.org/bugs.html
> 


Unfortunately, that site says they can't accept bugs that use any third
party packages, and the org-exported LaTeX file starts:

\documentclass[article,letterpaper,times,12pt,listings-bw,microtype]{scrartcl}
                   \usepackage{microtype}
                    \usepackage{mathpazo}
                   \usepackage[scale=.9]{tgheros}
                   \usepackage{tgcursor}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{amssymb}
\usepackage{hyperref}


Thanks!
-pd


-- 
  Peter Davis
  www.techcurmudgeon.com
  www.timebums.com

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

* Re: Blank page in LaTeX/PDF output
  2014-03-04  0:51                       ` Peter Davis
@ 2014-03-04  1:08                         ` John Hendy
  2014-03-04  1:13                           ` Peter Davis
  0 siblings, 1 reply; 24+ messages in thread
From: John Hendy @ 2014-03-04  1:08 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1480 bytes --]

On Mar 3, 2014 6:51 PM, "Peter Davis" <pfd@pfdstudio.com> wrote:
>
>
> On Sat, Mar 1, 2014, at 02:19 PM, John Hendy wrote:
> > I can confirm Peter's results, ...
>
> Thanks, John.
>
> >
> > I searched things like "latex page break 'section*' vs section" with
> > no obvious lead on why the two section styles would be different.
> > Regarding a bug report, if that's what this is, I just googled "latex
> > bugs" and got this page as the first hit:
> > - http://latex-project.org/bugs.html
> >
>
>
> Unfortunately, that site says they can't accept bugs that use any third
> party packages, and the org-exported LaTeX file starts:
>

Can you delete all of those lines, recompile with pdflatex, and still
reproduce?

If so, you're still good to go!

John

>
\documentclass[article,letterpaper,times,12pt,listings-bw,microtype]{scrartcl}
>                    \usepackage{microtype}
>                     \usepackage{mathpazo}
>                    \usepackage[scale=.9]{tgheros}
>                    \usepackage{tgcursor}
> \usepackage[utf8]{inputenc}
> \usepackage[T1]{fontenc}
> \usepackage{fixltx2e}
> \usepackage{graphicx}
> \usepackage{longtable}
> \usepackage{float}
> \usepackage{wrapfig}
> \usepackage{rotating}
> \usepackage[normalem]{ulem}
> \usepackage{amsmath}
> \usepackage{textcomp}
> \usepackage{marvosym}
> \usepackage{wasysym}
> \usepackage{amssymb}
> \usepackage{hyperref}
>
>
> Thanks!
> -pd
>
>
> --
>   Peter Davis
>   www.techcurmudgeon.com
>   www.timebums.com

[-- Attachment #2: Type: text/html, Size: 2262 bytes --]

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

* Re: Blank page in LaTeX/PDF output
  2014-03-04  1:08                         ` John Hendy
@ 2014-03-04  1:13                           ` Peter Davis
  2014-03-04  3:46                             ` John Hendy
  0 siblings, 1 reply; 24+ messages in thread
From: Peter Davis @ 2014-03-04  1:13 UTC (permalink / raw)
  To: emacs-orgmode

On Mon, Mar 03, 2014 at 07:08:35PM -0600, John Hendy wrote:
> 
> On Mar 3, 2014 6:51 PM, "Peter Davis" <pfd@pfdstudio.com> wrote:
> >
> >
> > On Sat, Mar 1, 2014, at 02:19 PM, John Hendy wrote:
> > > I can confirm Peter's results, ...
> >
> > Thanks, John.
> >
> > >
> > > I searched things like "latex page break 'section*' vs section" with
> > > no obvious lead on why the two section styles would be different.
> > > Regarding a bug report, if that's what this is, I just googled "latex
> > > bugs" and got this page as the first hit:
> > > - http://latex-project.org/bugs.html
> > >
> >
> >
> > Unfortunately, that site says they can't accept bugs that use any third
> > party packages, and the org-exported LaTeX file starts:
> >
> 
> Can you delete all of those lines, recompile with pdflatex, and still reproduce?
> 
> If so, you're still good to go!
> 

Unfortunately, it gets a lot of errors if I remove all the \usepackage lines, and I don't know which packages are third party or not.

-pd


-- 
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: Blank page in LaTeX/PDF output
  2014-03-04  1:13                           ` Peter Davis
@ 2014-03-04  3:46                             ` John Hendy
  2014-03-04 12:27                               ` Peter Davis
  0 siblings, 1 reply; 24+ messages in thread
From: John Hendy @ 2014-03-04  3:46 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

On Mon, Mar 3, 2014 at 7:13 PM, Peter Davis <pfd@pfdstudio.com> wrote:

[snip]

>> > > Regarding a bug report, if that's what this is, I just googled "latex
>> > > bugs" and got this page as the first hit:
>> > > - http://latex-project.org/bugs.html
>> > >
>> >
>> >
>> > Unfortunately, that site says they can't accept bugs that use any third
>> > party packages, and the org-exported LaTeX file starts:
>> >
>>
>> Can you delete all of those lines, recompile with pdflatex, and still reproduce?
>>
>> If so, you're still good to go!
>>
>
> Unfortunately, it gets a lot of errors if I remove all the \usepackage lines, and I don't know which packages are third party or not.

I was able to get rid of them all except for graphicx, and I also was
able to replicate with the standard article class :) Here's the
pastebin:
- http://pastebin.com/WeJXAjw7

I cleaned up some of the text just to remove other contributing
candidates (such as changing the tabular to {lll} alignment as not to
use p{}, and using just tabular vs. tabular inside table).

From my fiddling:
- As-is produces 4 pages, blank 3rd
- Commenting out the hyperref package does *not* produce a blank 3rd page
- Using \section* does *not* product a blank 3rd page

I added a comment linking to Wikipedia's Linux penguin that I used as
./image.png, just to make sure it wasn't possibly related to errors
related to no image being found.

I wondered if it had something to do with the numbered sections being
treated as links (since hyperref was the culprit package). I fiddled
with removing \label{sec-n}, but that didn't have an effect. I
wondered if that was triggering something due to it having links sort
of "ready" for the TOC even though none is present... no idea!

Anyway, as long as graphicx and hyperref are not considered "3rd
party," I think you could still submit the report. You may be told
that since there are overfull hbox and vbox's that it's not their
problem, but I'd still expect the results to be the same with \section
vs. \section*, and with[out] hyperref.


Good luck!
John

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

* Re: Blank page in LaTeX/PDF output
  2014-03-04  3:46                             ` John Hendy
@ 2014-03-04 12:27                               ` Peter Davis
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Davis @ 2014-03-04 12:27 UTC (permalink / raw)
  To: John Hendy


On Mon, Mar 3, 2014, at 10:46 PM, John Hendy wrote:
[snip]
> On Mon, Mar 3, 2014 at 7:13 PM, Peter Davis <pfd@pfdstudio.com> wrote:
> From my fiddling:
> - As-is produces 4 pages, blank 3rd
> - Commenting out the hyperref package does *not* produce a blank 3rd page
> - Using \section* does *not* product a blank 3rd page

Thanks, John. It certainly seems that hyperref is at least partially to
blame here. I'll have to check on what the developers consider a 3rd
party package. hyperref itself loads a bunch of other packages, so it
gets very complicated.

> I added a comment linking to Wikipedia's Linux penguin that I used as
> ./image.png, just to make sure it wasn't possibly related to errors
> related to no image being found.

I first saw the problem when I was using actual images, so I knew it
wasn't that.

> I wondered if it had something to do with the numbered sections being
> treated as links (since hyperref was the culprit package). I fiddled
> with removing \label{sec-n}, but that didn't have an effect. I
> wondered if that was triggering something due to it having links sort
> of "ready" for the TOC even though none is present... no idea!

Seems plausible.

> Anyway, as long as graphicx and hyperref are not considered "3rd
> party," I think you could still submit the report. You may be told
> that since there are overfull hbox and vbox's that it's not their
> problem, but I'd still expect the results to be the same with \section
> vs. \section*, and with[out] hyperref.

Thanks again, John. I'll look into this and report back whatever I find.

Best,
-pd

-- 
  Peter Davis
  www.techcurmudgeon.com
  www.timebums.com

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

end of thread, other threads:[~2014-03-04 12:42 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-28 16:59 Blank page in LaTeX/PDF output Peter Davis
2014-02-28 17:03 ` John Hendy
2014-02-28 17:26   ` Peter Davis
2014-02-28 17:36     ` Peter Davis
2014-02-28 17:37     ` John Hendy
2014-02-28 18:19       ` Peter Davis
2014-02-28 18:32         ` Peter Davis
2014-03-01  0:38     ` Nick Dokos
2014-03-01  1:21       ` Peter Davis
2014-03-01  1:27         ` John Hendy
2014-03-01 13:01           ` Nick Dokos
2014-03-01  1:30         ` Peter Davis
2014-03-01  3:32           ` Nick Dokos
2014-03-01  3:39             ` Peter Davis
2014-03-01  5:27               ` John Hendy
2014-03-01 12:47                 ` Nick Dokos
2014-03-01 14:48                   ` Peter Davis
2014-03-01 19:19                     ` John Hendy
2014-03-04  0:51                       ` Peter Davis
2014-03-04  1:08                         ` John Hendy
2014-03-04  1:13                           ` Peter Davis
2014-03-04  3:46                             ` John Hendy
2014-03-04 12:27                               ` Peter Davis
2014-03-01 14:42         ` Nick Dokos

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.