emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Some settings are missing while exporting included org files to the tex file
@ 2012-04-17 13:20 Keith
  2012-04-29  9:26 ` Eric Fraga
  0 siblings, 1 reply; 2+ messages in thread
From: Keith @ 2012-04-17 13:20 UTC (permalink / raw)
  To: emacs-orgmode

Dear Org-mode users:

Recently I am considering using org-mode to write my thesis and would 
like to separate each chapter into a single file. In order to do so, I 
created a file gathering all the rest files like this:

****************************************************

#+OPTIONS: Tex:t |:t toc:nil
#+OPTIONS: LaTeX:t
#+LaTeX_CLASS: koma-book
#+LATEX_HEADER: \usepackage[english,ngerman]{babel}
#+LATEX_HEADER: \usepackage{fancyhdr}
...

#+BEGIN_LATEX
\pagestyle{fancy}

\newenvironment{abstract}%
{\cleardoublepage \null \vfill \begin{center}%
\bfseries \abstractname \end{center}}%
{\vfill \null }
#+END_LATEX

#+TITLE:
#+AUTHOR:
#+DATE: \today

#+INCLUDE: Ch00_Abs_Eng.org
#+INCLUDE: Ch00_Abs_Deu.org

#+LATEX: \selectlanguage{english}
#+LATEX: \tableofcontents
#+LATEX: \listoftables
#+LATEX: \listoffigures


#+INCLUDE: Ch01_Introduction.org :minlevel 0
...
#+INCLUDE: Ch07_Conclusion.org :minlevel 0

\bibliographystyle{plain}
\bibliography{References}
****************************************************

I noticed the tex output misses some settings and those are before the 
first chapter, like included abstract, table of contents, etc. and after 
the last chapter, like bibliography. To work around, I have to add 
something like this:

****************************************************
...
* Introduction
#+INCLUDE: Ch01_Introduction.org :minlevel 0
...
****************************************************
and also move the bibliography settings to the end of the file of last 
chapter.

I am wondering if there is any way to keep the structure I had earlier 
or at least to know where the problem is. Any suggestion or idea?

In addition, I also tried to export a single org file without any 
preamble to be able to use input/include in latex but with no luck. And 
it seems org mode does not support this function yet. I would recommend 
the development team to re-consider this feature. Now the tex output of 
org mode draws all the separate files into single tex file and the user 
has to compile the entire tex file every time. By doing so, it also 
misses the feature of LaTex as mentioned here: 
http://web.science.mq.edu.au/~rdale/resources/writingnotes/latexstruct.html

emacs version: 23.4
orgmode version: 7.8

R.
Keith

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

* Re: Some settings are missing while exporting included org files to the tex file
  2012-04-17 13:20 Some settings are missing while exporting included org files to the tex file Keith
@ 2012-04-29  9:26 ` Eric Fraga
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Fraga @ 2012-04-29  9:26 UTC (permalink / raw)
  To: Keith; +Cc: emacs-orgmode

Keith <kigiokli@gmail.com> writes:

> Dear Org-mode users:
>
> Recently I am considering using org-mode to write my thesis and would 
> like to separate each chapter into a single file. In order to do so, I 
> created a file gathering all the rest files like this:

[...]

> In addition, I also tried to export a single org file without any 
> preamble to be able to use input/include in latex but with no luck. And 
> it seems org mode does not support this function yet. I would recommend 
> the development team to re-consider this feature. Now the tex output of 
> org mode draws all the separate files into single tex file and the user 
> has to compile the entire tex file every time. By doing so, it also 
> misses the feature of LaTex as mentioned here: 
> http://web.science.mq.edu.au/~rdale/resources/writingnotes/latexstruct.html
>

Keith,

I cannot help you with the bulk of your email, regarding the use of
#+include to bring in different chapters etc into a document and/or the
possibility of working on each individual chapter in turn.

However, because of these limitations, that I also ran into a long time
ago, I simply put everything into one document.  The advice given in the
web page noted above is directed at LaTeX but is less necessary for org
files.  The motivation is the need or desire to work on smaller bits at
a time to have things go quicker, I believe.  The easy way to handle
this in org is to use selective exporting, primarily through the use of
tags.

So, for instance, if I am working on a long document and am currently
working on chapter 2 of this document, my document would look like this:

,----
| ...                                     |
| #+EXPORT_SELECT_TAGS: export            |
| #+EXPORT_EXCLUDE_TAGS: noexport         |
| ...                                     |
| * Introduction ...           :noexport: |
| * Chapter 1 ...              :noexport: |
| * Chapter 2                             |
| ...                                     |
| * Chapter 3 ...              :noexport: |
| ...                                     |
`----

When asking for an export, only Chapter 2 would be exported.

It is trivial to add/remove the noexport tags.

The only difficulty with this arises when you need latex material at the
*end* of the document, such as bibliography settings.  For this, I
simply create a final "* Postamble" section which is exported.  When my
document is finished, I simply remove the heading line and re-export the
whole document.

A minor irritation appears if you have cross-references between chapters
but that really is nothing more than an irritation so I have learnt to
ignore it.

HTH,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-414-gb3e8a8

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

end of thread, other threads:[~2012-04-29  9:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-17 13:20 Some settings are missing while exporting included org files to the tex file Keith
2012-04-29  9:26 ` Eric Fraga

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