emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Broken LaTeX export
@ 2012-05-29 12:59 SW
  2012-05-29 16:01 ` Nick Dokos
  0 siblings, 1 reply; 10+ messages in thread
From: SW @ 2012-05-29 12:59 UTC (permalink / raw)
  To: emacs-orgmode

I'm working on a large document in org-mode which I export to LaTeX. At present,
the outline/structure of the document has been created, but not much of the
content. The LaTeX export has strange pagination, a blank page and text that
runs off the page. Where can I paste/post this example?

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

* Re: Broken LaTeX export
  2012-05-29 12:59 Broken LaTeX export SW
@ 2012-05-29 16:01 ` Nick Dokos
  2012-05-29 16:57   ` SW
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2012-05-29 16:01 UTC (permalink / raw)
  To: SW; +Cc: emacs-orgmode

SW <sabrewolfy@gmail.com> wrote:

> I'm working on a large document in org-mode which I export to LaTeX. At present,
> the outline/structure of the document has been created, but not much of the
> content. The LaTeX export has strange pagination, a blank page and text that
> runs off the page. Where can I paste/post this example?
> 
> 

If you don't mind making it public, I'd say go ahead and post the org
file (and any relevant customizations) here.

Nick

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

* Re: Broken LaTeX export
  2012-05-29 16:01 ` Nick Dokos
@ 2012-05-29 16:57   ` SW
  2012-05-30  9:08     ` Nick Dokos
  0 siblings, 1 reply; 10+ messages in thread
From: SW @ 2012-05-29 16:57 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <nicholas.dokos <at> hp.com> writes:
 
> If you don't mind making it public, I'd say go ahead and post the org
> file (and any relevant customizations) here.

"M-x replace-regex <RET> \w+ <RET> Text <RET>"

I replaced all words with "Text". Here is the document outline. The breakage
happens from page 3 onwards. I export to LaTeX from org-mode 7.8.06 in Emacs
23.2.1 and then compile to PDF with pdflatex twice.

=========================================================
=START=============================================START=

#+OPTIONS: toc:nil

* Text 1: Text
** Text
** Text
*** Text
*** Text text text TEXT text
**** Text text
**** Text text
**** Text Text
***** Text text TEXT text
***** Text text text TEXT text text Text
***** Text text text text text
**** Text text
**** Text text
**** TEXT
*** Text
*** Text
** TEXT text / text text text text
*** TEXT text text / text text / TEXT
**** Text text
**** Text text
***** Text
***** Text
***** Text
**** Text text
**** TEXT text
** Text text text text
*** Text, text text text text text
*** Text text: Text
**** Text text text text text
**** text text text text
**** Text text
**** Text text, text text text
** Text: text Text text
*** Text text
*** TEXT text
**** Text text text text text Text
***** Text TEXT text text text
***** Text TEXT text text text
***** Text TEXT
**** Text text
**** Text text text
**** Text
**** Text / text text text text
** TEXT text / text text
*** TEXT/TEXT
*** TEXT
*** TEXT
*** TEXT
*** TEXT
** TEXT/TEXT text-text
*** Text / text
*** Text
*** Text text text text text text
*** Text text text
*** Text-Text Text
*** Text text
* Text text: Text text Text / Text
** Text, Text Text, Text text Text
*** Text
*** Text Text
*** Text
*** Text
** Text Text
*** Text Text
*** Text Text
*** Text
*** Text Text
*** Text Text
*** Text text text Text
*** Text-Text Text
** Text Text
*** Text text Text
*** Text text Text Text
*** TEXT Text
*** Text Text Text
*** Text Text Text Text
*** Text
*** Text
*** Text Text Text
*** Text
*** Text
*** Text text Text
** Text Text
*** Text / Text
*** Text
* Text text: Text
** Text
*** Text / Text
**** Text text text-text
**** Text Text
**** Text text text
**** Text text
*** Text
*** Text, text text
*** Text text text text
*** Text Text
*** Text Text Text
*** Text
*** TEXT
*** TEXT/Text text
* Text text: Text text: Text
* Text text: Text text: Text
* Text text: Text text: Text Text Text
* Text text: Text text: Text Text Text
* Text text: Text
* Text text: Text Text
** Text text
*** Text
** Text text Text
* Text text: Text text Text
* Text text: Text

=END=================================================END=
=========================================================

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

* Re: Broken LaTeX export
  2012-05-29 16:57   ` SW
@ 2012-05-30  9:08     ` Nick Dokos
  2012-05-30  9:16       ` SW
                         ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Nick Dokos @ 2012-05-30  9:08 UTC (permalink / raw)
  To: SW; +Cc: emacs-orgmode

SW <sabrewolfy@gmail.com> wrote:

> Nick Dokos <nicholas.dokos <at> hp.com> writes:
>  
> > If you don't mind making it public, I'd say go ahead and post the org
> > file (and any relevant customizations) here.
> 
> "M-x replace-regex <RET> \w+ <RET> Text <RET>"
> 
> I replaced all words with "Text". Here is the document outline. The breakage
> happens from page 3 onwards. I export to LaTeX from org-mode 7.8.06 in Emacs
> 23.2.1 and then compile to PDF with pdflatex twice.
> 
> =========================================================
> =START=============================================START=
> 
> ....
> 
> =END=================================================END=
> =========================================================
> 
> 

Interesting: it seems to be a latex bug of some sort, but I haven't had
time to play with it too much yet. I'm trying things like modifying the
tex file slightly and seeing if the empty page(s)/overfull page(s)
persist.  So far, it seems that all the packages that org includes are
innocent: I took them all out and the strangeness persists.

Nick

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

* Re: Broken LaTeX export
  2012-05-30  9:08     ` Nick Dokos
@ 2012-05-30  9:16       ` SW
  2012-05-30 17:46         ` Achim Gratz
  2012-05-30  9:45       ` SW
  2012-05-30 10:51       ` SW
  2 siblings, 1 reply; 10+ messages in thread
From: SW @ 2012-05-30  9:16 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <nicholas.dokos <at> hp.com> writes:

> Interesting: it seems to be a latex bug of some sort, but I haven't had
> time to play with it too much yet. I'm trying things like modifying the
> tex file slightly and seeing if the empty page(s)/overfull page(s)
> persist.  So far, it seems that all the packages that org includes are
> innocent: I took them all out and the strangeness persists.

Thanks for the details. I noticed the overfull warnings from pdflatex.
Smaller/simpler test cases I tried exported to LaTeX perfectly.

FWIW:

$ pdflatex --version
pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian)
kpathsea version 5.0.0
<snip>
Compiled with libpng 1.2.44; using libpng 1.2.44
Compiled with zlib 1.2.3.4; using zlib 1.2.3.4
Compiled with poppler version 0.12.4

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

* Re: Broken LaTeX export
  2012-05-30  9:08     ` Nick Dokos
  2012-05-30  9:16       ` SW
@ 2012-05-30  9:45       ` SW
  2012-06-01  7:42         ` Eric S Fraga
  2012-05-30 10:51       ` SW
  2 siblings, 1 reply; 10+ messages in thread
From: SW @ 2012-05-30  9:45 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <nicholas.dokos <at> hp.com> writes:

> Interesting: it seems to be a latex bug of some sort, but I haven't had
> time to play with it too much yet. I'm trying things like modifying the
> tex file slightly and seeing if the empty page(s)/overfull page(s)
> persist.  So far, it seems that all the packages that org includes are
> innocent: I took them all out and the strangeness persists.

I shortened the document by moving "\end{document}" around to try to find the
problem. In some cases, the document rendered correctly. I think this is related
to having to many "section" type headings in LaTeX with no content.

To test this, I added:

\usepackage[english]{babel}
\usepackage{blindtext}

And then used "M-x replace-string" to replace "\subs" with "\blindtext^q^j\subs"
to enter a lots of text into the document. It now renders correctly, with the
end of the document back to where it should be.

However, this is a work-around, not a solution, as part of the appeal of
org-mode and the LaTeX export is to be able to work with and generate outlines
and structures of documents first, before adding all the content.

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

* Re: Broken LaTeX export
  2012-05-30  9:08     ` Nick Dokos
  2012-05-30  9:16       ` SW
  2012-05-30  9:45       ` SW
@ 2012-05-30 10:51       ` SW
  2 siblings, 0 replies; 10+ messages in thread
From: SW @ 2012-05-30 10:51 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <nicholas.dokos <at> hp.com> writes:

> Interesting: it seems to be a latex bug of some sort, but I haven't had
> time to play with it too much yet. I'm trying things like modifying the
> tex file slightly and seeing if the empty page(s)/overfull page(s)
> persist.  So far, it seems that all the packages that org includes are
> innocent: I took them all out and the strangeness persists.

Posted as a question here:

http://tex.stackexchange.com/questions/57857/overfull-box-and-broken-pagination

with two answers so far, both of them useful I think.

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

* Re: Broken LaTeX export
  2012-05-30  9:16       ` SW
@ 2012-05-30 17:46         ` Achim Gratz
  0 siblings, 0 replies; 10+ messages in thread
From: Achim Gratz @ 2012-05-30 17:46 UTC (permalink / raw)
  To: emacs-orgmode

SW writes:
> Thanks for the details. I noticed the overfull warnings from pdflatex.
> Smaller/simpler test cases I tried exported to LaTeX perfectly.

LaTeX tries very hard not to break pages around headings.  It expects
you to tell it when it is OK to not obey that rule, but you never did.
The correct way of dealing with a file that consists only of headings is
to write your own style file and explicitly allow page breaks in the
sectioning commands (usually before the heading).  While you're doing
that you can also chose a more suitable formatting.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

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

* Re: Broken LaTeX export
  2012-05-30  9:45       ` SW
@ 2012-06-01  7:42         ` Eric S Fraga
  2012-07-04 12:41           ` SW
  0 siblings, 1 reply; 10+ messages in thread
From: Eric S Fraga @ 2012-06-01  7:42 UTC (permalink / raw)
  To: SW; +Cc: emacs-orgmode

SW <sabrewolfy@gmail.com> writes:

> Nick Dokos <nicholas.dokos <at> hp.com> writes:
>
>> Interesting: it seems to be a latex bug of some sort, but I haven't had
>> time to play with it too much yet. I'm trying things like modifying the
>> tex file slightly and seeing if the empty page(s)/overfull page(s)
>> persist.  So far, it seems that all the packages that org includes are
>> innocent: I took them all out and the strangeness persists.

[...]

> However, this is a work-around, not a solution, as part of the appeal of
> org-mode and the LaTeX export is to be able to work with and generate outlines
> and structures of documents first, before adding all the content.

A simple solution which keeps your interest in the outline structure at
this stage of the writing is to add the line

#+options: H:3

to the document (remembering to refresh org by typing C-c C-c on this
line).  This converts all 4th level headings and lower to lists on
export without you having to change the document content at all.

For your test document, this works just fine.

Once you have added enough text, you can change the 3 to 5 and your
document should export just fine.

HTH,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.10-630-g4144c5.dirty

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

* Re: Broken LaTeX export
  2012-06-01  7:42         ` Eric S Fraga
@ 2012-07-04 12:41           ` SW
  0 siblings, 0 replies; 10+ messages in thread
From: SW @ 2012-07-04 12:41 UTC (permalink / raw)
  To: emacs-orgmode

Eric S Fraga <e.fraga <at> ucl.ac.uk> writes:

> A simple solution which keeps your interest in the outline structure at
> this stage of the writing is to add the line
> 
> #+options: H:3

...

Thanks. That's a useful suggestion.

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

end of thread, other threads:[~2012-07-04 12:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-29 12:59 Broken LaTeX export SW
2012-05-29 16:01 ` Nick Dokos
2012-05-29 16:57   ` SW
2012-05-30  9:08     ` Nick Dokos
2012-05-30  9:16       ` SW
2012-05-30 17:46         ` Achim Gratz
2012-05-30  9:45       ` SW
2012-06-01  7:42         ` Eric S Fraga
2012-07-04 12:41           ` SW
2012-05-30 10:51       ` SW

Code repositories for project(s) associated with this public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).