emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug in LaTeX export
@ 2009-07-10 10:50 Holst Thomas (DS-ET/ECF1)
  2009-07-10 12:19 ` Matthew Lundin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Holst Thomas (DS-ET/ECF1) @ 2009-07-10 10:50 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

Hello,

I think I discoverd a bug in LaTeX export. I mark a subtree with C-c @
and then export it to LaTeX with C-c C-e L.

If the subtree has no further subtrees the LaTeX-file not only contains
the region, but also the rest of the document to the end.

Here is an example:

,----[ test.org ]
| * Kapitel 1
| ** Kapitel 1.1
|    foo bar
| * Kapitel 2
|   bar foo
`----

If the Kapitel 1.1 subtree is marked the LaTeX output looks like this:

,----[ LaTeX output ]
| % Created 2009-07-10 Fr 12:33
| \documentclass[11pt,a4paper]{article}
| \usepackage[latin1]{inputenc}
| \usepackage[T1]{fontenc}
| \usepackage{hyperref}
|
|
| \title{Kapitel 1.1}
| \author{Holst Thomas}
| \date{10 Juli 2009}
|
| \begin{document}
|
| \textbf{Kapitel 1.1}
|
| \setcounter{tocdepth}{3}
| \tableofcontents
| \vspace*{1cm}
|    foo bar
| \begin{itemize}
| \item Kapitel 2
|   bar foo
| \end{itemize}
|
| \end{document}
`----

Kapitel 2 is also included. This does not happen if the subtree has
additonal subtrees. If I mark the Kapitel 1 subtree the output is as
expected.

When the bug happens, `org-export-latex-default-class' does not work.
Instead the class 'article' is used.

It does not happen if the region is exported to ASCII or HTML.

My setup is:

emacs 22.2.1, WinXP, org-mode 6.28trans from yesterday.

I also observed this bug with org-mode 6.28b. And when I start emacs
with the option '-Q'.


Thomas

--
"Das Leben ist so einfach,
 dass es schon wieder schwierig ist!"

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

* Re: Bug in LaTeX export
  2009-07-10 10:50 Bug in LaTeX export Holst Thomas (DS-ET/ECF1)
@ 2009-07-10 12:19 ` Matthew Lundin
  2009-07-10 12:45 ` Matthew Lundin
  2009-07-16 19:43 ` Bastien
  2 siblings, 0 replies; 6+ messages in thread
From: Matthew Lundin @ 2009-07-10 12:19 UTC (permalink / raw)
  To: Holst Thomas (DS-ET/ECF1); +Cc: emacs-orgmode@gnu.org

"Holst Thomas (DS-ET/ECF1)" <Thomas.Holst@de.bosch.com> writes:

> Hello,
>
> I think I discoverd a bug in LaTeX export. I mark a subtree with C-c @
> and then export it to LaTeX with C-c C-e L.
>
> If the subtree has no further subtrees the LaTeX-file not only contains
> the region, but also the rest of the document to the end.
>
> Here is an example:
>
> ,----[ test.org ]
> | * Kapitel 1
> | ** Kapitel 1.1
> |    foo bar
> | * Kapitel 2
> |   bar foo
> `----
>
> If the Kapitel 1.1 subtree is marked the LaTeX output looks like this:
>
> ,----[ LaTeX output ]
> | % Created 2009-07-10 Fr 12:33
> | \documentclass[11pt,a4paper]{article}
> | \usepackage[latin1]{inputenc}
> | \usepackage[T1]{fontenc}
> | \usepackage{hyperref}
> |
> |
> | \title{Kapitel 1.1}
> | \author{Holst Thomas}
> | \date{10 Juli 2009}
> |
> | \begin{document}
> |
> | \textbf{Kapitel 1.1}
> |
> | \setcounter{tocdepth}{3}
> | \tableofcontents
> | \vspace*{1cm}
> |    foo bar
> | \begin{itemize}
> | \item Kapitel 2
> |   bar foo
> | \end{itemize}
> |
> | \end{document}
> `----

I can't reproduce this. Here is the output when I type C-c @ and C-c C-e
L. (I just pulled the most recent org from the git repo for emacs 22):

--8<---------------cut here---------------start------------->8---
% Created 2009-07-10 Fri 07:10
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{hyperref}


\title{Kapitel 1}
\author{Matthew Lundin}
\date{10 July 2009}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}
\section{Kapitel 1.1}
\label{sec-1}

  foo bar
\end{document}
--8<---------------cut here---------------end--------------->8---

What are your other org-latex settings?

Best,
Matt

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

* Re: Bug in LaTeX export
  2009-07-10 10:50 Bug in LaTeX export Holst Thomas (DS-ET/ECF1)
  2009-07-10 12:19 ` Matthew Lundin
@ 2009-07-10 12:45 ` Matthew Lundin
  2009-07-10 12:56   ` AW: " Holst Thomas (DS-ET/ECF1)
  2009-07-16 19:43 ` Bastien
  2 siblings, 1 reply; 6+ messages in thread
From: Matthew Lundin @ 2009-07-10 12:45 UTC (permalink / raw)
  To: Holst Thomas (DS-ET/ECF1); +Cc: emacs-orgmode@gnu.org

"Holst Thomas (DS-ET/ECF1)" <Thomas.Holst@de.bosch.com> writes:

> I think I discoverd a bug in LaTeX export. I mark a subtree with C-c @
> and then export it to LaTeX with C-c C-e L.
>
> If the subtree has no further subtrees the LaTeX-file not only contains
> the region, but also the rest of the document to the end.
>
> Here is an example:
>
> ,----[ test.org ]
> | * Kapitel 1
> | ** Kapitel 1.1
> |    foo bar
> | * Kapitel 2
> |   bar foo
> `----
>
> If the Kapitel 1.1 subtree is marked the LaTeX output looks like this:
>
> ,----[ LaTeX output ]
> | % Created 2009-07-10 Fr 12:33
> | \documentclass[11pt,a4paper]{article}
> | \usepackage[latin1]{inputenc}
> | \usepackage[T1]{fontenc}
> | \usepackage{hyperref}
> |
> |
> | \title{Kapitel 1.1}
> | \author{Holst Thomas}
> | \date{10 Juli 2009}
> |
> | \begin{document}
> |
> | \textbf{Kapitel 1.1}
> |
> | \setcounter{tocdepth}{3}
> | \tableofcontents
> | \vspace*{1cm}
> |    foo bar
> | \begin{itemize}
> | \item Kapitel 2
> |   bar foo
> | \end{itemize}
> |
> | \end{document}
> `----
>
> Kapitel 2 is also included. This does not happen if the subtree has
> additonal subtrees. If I mark the Kapitel 1 subtree the output is as
> expected.
>
> When the bug happens, `org-export-latex-default-class' does not work.
> Instead the class 'article' is used.
>
> It does not happen if the region is exported to ASCII or HTML.
>
> My setup is:
>
> emacs 22.2.1, WinXP, org-mode 6.28trans from yesterday.

Do you have transient-mark-mode enabled? I tested this with Emacs 22 and
when transient-mark-mode was enabled, it exported correctly (i.e., just
the 1st tree). When transient-mark-mode was turned off, I got the
results you describe above.

Just a thought...

Best,
Matt

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

* AW: Bug in LaTeX export
  2009-07-10 12:45 ` Matthew Lundin
@ 2009-07-10 12:56   ` Holst Thomas (DS-ET/ECF1)
  2009-07-10 14:36     ` Matthew Lundin
  0 siblings, 1 reply; 6+ messages in thread
From: Holst Thomas (DS-ET/ECF1) @ 2009-07-10 12:56 UTC (permalink / raw)
  To: Matthew Lundin; +Cc: emacs-orgmode@gnu.org

Hello Matt,

> Von: Matthew Lundin [mailto:mdl@imapmail.org]
> Betreff: Re: Bug in LaTeX export
>
> "Holst Thomas (DS-ET/ECF1)" <Thomas.Holst@de.bosch.com> writes:

>> [Problem exporting a subtree with no further subsubtrees]

> Do you have transient-mark-mode enabled? I tested this with Emacs 22
> and when transient-mark-mode was enabled, it exported correctly (i.e.,
> just the 1st tree). When transient-mark-mode was turned off, I got the
> results you describe above.

> Just a thought...

yes I have transient-mark-mode enabled.

Here is a simpler example to reproduce the bug:
--8<---------------cut here---------------start------------->8---
* Kapitel 1
   dingens
   foo bar
* Kapitel 2
  bar foo
--8<---------------cut here---------------end-------------->8---

If you try to export only subtree 'Kapitel 1' to LaTeX you also have
'Kapitel 2' in the LaTeX output.

Thomas

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

* Re: AW: Bug in LaTeX export
  2009-07-10 12:56   ` AW: " Holst Thomas (DS-ET/ECF1)
@ 2009-07-10 14:36     ` Matthew Lundin
  0 siblings, 0 replies; 6+ messages in thread
From: Matthew Lundin @ 2009-07-10 14:36 UTC (permalink / raw)
  To: Holst Thomas (DS-ET/ECF1); +Cc: Matthew Lundin, emacs-orgmode@gnu.org

"Holst Thomas (DS-ET/ECF1)" <Thomas.Holst@de.bosch.com> writes:
>
> yes I have transient-mark-mode enabled.
>
> Here is a simpler example to reproduce the bug:
> --8<---------------cut here---------------start------------->8---
> * Kapitel 1
>    dingens
>    foo bar
> * Kapitel 2
>   bar foo
> --8<---------------cut here---------------end-------------->8---
>
> If you try to export only subtree 'Kapitel 1' to LaTeX you also have
> 'Kapitel 2' in the LaTeX output.

With this example, I can reproduce the bug.

Best,
Matt

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

* Re: Bug in LaTeX export
  2009-07-10 10:50 Bug in LaTeX export Holst Thomas (DS-ET/ECF1)
  2009-07-10 12:19 ` Matthew Lundin
  2009-07-10 12:45 ` Matthew Lundin
@ 2009-07-16 19:43 ` Bastien
  2 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2009-07-16 19:43 UTC (permalink / raw)
  To: Holst Thomas (DS-ET/ECF1); +Cc: emacs-orgmode@gnu.org

"Holst Thomas (DS-ET/ECF1)" <Thomas.Holst@de.bosch.com> writes:

> I think I discoverd a bug in LaTeX export. I mark a subtree with C-c @
> and then export it to LaTeX with C-c C-e L.
>
> If the subtree has no further subtrees the LaTeX-file not only contains
> the region, but also the rest of the document to the end.

Fixed, thanks!

-- 
 Bastien

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

end of thread, other threads:[~2009-07-16 19:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-10 10:50 Bug in LaTeX export Holst Thomas (DS-ET/ECF1)
2009-07-10 12:19 ` Matthew Lundin
2009-07-10 12:45 ` Matthew Lundin
2009-07-10 12:56   ` AW: " Holst Thomas (DS-ET/ECF1)
2009-07-10 14:36     ` Matthew Lundin
2009-07-16 19:43 ` Bastien

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).