* LaTeX export gives extra lines between table of contents and first section
@ 2008-10-03 1:04 Hsiu-Khuern Tang
2008-10-03 18:13 ` Hsiu-Khuern Tang
2008-10-10 21:13 ` Carsten Dominik
0 siblings, 2 replies; 4+ messages in thread
From: Hsiu-Khuern Tang @ 2008-10-03 1:04 UTC (permalink / raw)
To: emacs-orgmode
I'm new to Org-Mode, and I'm getting to like it a lot!
I am running Org 6.07b. I have this simple Org file:
----------------------------------------
* top level
** second level
test
----------------------------------------
If I run M-x org-export-region-as-latex, I get this output:
----------------------------------------
% Created 2008-10-02 Thu 17:58
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\title{* top level}
\author{Tang Hsiu Khuern}
\date{02 October 2008}
\begin{document}
\maketitle
\setcounter{tocdepth}{3}
\tableofcontents
** second level
test
\section{second level}
test
\end{document}
----------------------------------------
As you can see, there are extra lines between \tableofcontents and \section,
which I think shouldn't be there. If I select the whole file as the region and
run M-x org-export-region-as-latex, the extra lines get _duplicated_:
----------------------------------------
...
\tableofcontents
** second level
test
** second level
test
\section{second level}
...
----------------------------------------
--
Best,
Hsiu-Khuern.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: LaTeX export gives extra lines between table of contents and first section
2008-10-03 1:04 LaTeX export gives extra lines between table of contents and first section Hsiu-Khuern Tang
@ 2008-10-03 18:13 ` Hsiu-Khuern Tang
2008-10-10 21:13 ` Carsten Dominik
1 sibling, 0 replies; 4+ messages in thread
From: Hsiu-Khuern Tang @ 2008-10-03 18:13 UTC (permalink / raw)
To: emacs-orgmode
* On Fri 01:04AM +0000, 03 Oct 2008, Tang, Hsiu-Khuern (hsiu-khuern.tang@hp.com) wrote:
> I'm new to Org-Mode, and I'm getting to like it a lot!
>
> I am running Org 6.07b. I have this simple Org file:
>
> ----------------------------------------
> * top level
>
> ** second level
> test
> ----------------------------------------
>
> If I run M-x org-export-region-as-latex, I get this output:
Sorry, I meant M-x org-export-as-latex here. I've narrowed this down to
the following behavior: with the above input file, the exported LaTeX is:
----------------------------------------
% standard preamble
\title{* top level}
\author{Tang Hsiu Khuern}
\date{03 October 2008}
\begin{document}
\maketitle
\setcounter{tocdepth}{3}
\tableofcontents
** second level
test
\section{second level}
test
\end{document}
----------------------------------------
Here, the first heading is used for the title, as documented in "12.7.1
LaTeX export command". (That description is perhaps inaccurate, since
it suggests that this only happens if there is an active region.)
If I suppress this by add the option #+TITLE: my title, I get this
output, without the extra lines:
----------------------------------------
% standard preamble
\title{my title}
\author{Tang Hsiu Khuern}
\date{03 October 2008}
\begin{document}
\maketitle
\setcounter{tocdepth}{3}
\tableofcontents
\section{top level}
\subsection{second level}
test
\end{document}
----------------------------------------
I also get output without extra lines if, instead of setting #+TITLE
explicitly, I give a dummy heading to be used as the title:
----------------------------------------
* my title
* something else
** second level
test
> * top level
>
> ** second level
> test
----------------------------------------
So it seems like something undesirable happens when org-export-as-latex
needs to use the heading name as the title, _and_ the next section is a
subheading.
--
Best,
Hsiu-Khuern.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: LaTeX export gives extra lines between table of contents and first section
2008-10-03 1:04 LaTeX export gives extra lines between table of contents and first section Hsiu-Khuern Tang
2008-10-03 18:13 ` Hsiu-Khuern Tang
@ 2008-10-10 21:13 ` Carsten Dominik
2008-10-13 22:26 ` Hsiu-Khuern Tang
1 sibling, 1 reply; 4+ messages in thread
From: Carsten Dominik @ 2008-10-10 21:13 UTC (permalink / raw)
To: Hsiu-Khuern Tang; +Cc: emacs-orgmode
Hi Hsiu,
looks like there is a bug in the LaTeX exporter when
the very first line of the file is already a headline.
I do not right now see an easy way to fix this, and Bastien
does not seem to have time. So for the time being,
just leave the first line of a file empty - that should
help.
- Carsten
On Oct 3, 2008, at 3:04 AM, Hsiu-Khuern Tang wrote:
> I'm new to Org-Mode, and I'm getting to like it a lot!
>
> I am running Org 6.07b. I have this simple Org file:
>
> ----------------------------------------
> * top level
>
> ** second level
> test
> ----------------------------------------
>
> If I run M-x org-export-region-as-latex, I get this output:
>
> ----------------------------------------
> % Created 2008-10-02 Thu 17:58
> \documentclass[11pt,a4paper]{article}
> \usepackage[utf8]{inputenc}
> \usepackage[T1]{fontenc}
> \usepackage{hyperref}
>
>
> \title{* top level}
> \author{Tang Hsiu Khuern}
> \date{02 October 2008}
>
> \begin{document}
>
> \maketitle
>
> \setcounter{tocdepth}{3}
> \tableofcontents
>
>
> ** second level
> test
> \section{second level}
>
> test
>
> \end{document}
> ----------------------------------------
>
> As you can see, there are extra lines between \tableofcontents and
> \section,
> which I think shouldn't be there. If I select the whole file as the
> region and
> run M-x org-export-region-as-latex, the extra lines get _duplicated_:
>
> ----------------------------------------
> ...
> \tableofcontents
>
>
> ** second level
> test
>
> ** second level
> test
> \section{second level}
> ...
> ----------------------------------------
>
> --
> Best,
> Hsiu-Khuern.
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: LaTeX export gives extra lines between table of contents and first section
2008-10-10 21:13 ` Carsten Dominik
@ 2008-10-13 22:26 ` Hsiu-Khuern Tang
0 siblings, 0 replies; 4+ messages in thread
From: Hsiu-Khuern Tang @ 2008-10-13 22:26 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
* On Fri 09:13PM +0000, 10 Oct 2008, Carsten Dominik (dominik@science.uva.nl) wrote:
> Hi Hsiu,
>
> looks like there is a bug in the LaTeX exporter when
> the very first line of the file is already a headline.
> I do not right now see an easy way to fix this, and Bastien
> does not seem to have time. So for the time being,
> just leave the first line of a file empty - that should
> help.
>
> - Carsten
Yes, that works! Thank you for looking into this and for providing this
simple workaround. This is much better than what I am currently doing:
introducing a dummy headline to be used as a title.
--
Best,
Hsiu-Khuern.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-10-13 22:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-03 1:04 LaTeX export gives extra lines between table of contents and first section Hsiu-Khuern Tang
2008-10-03 18:13 ` Hsiu-Khuern Tang
2008-10-10 21:13 ` Carsten Dominik
2008-10-13 22:26 ` Hsiu-Khuern Tang
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).