[O] Export issue: Text not exportet to latex but to html (emacs23.2 windows and orgmode 7.7)

2011-08-28 Thread Markus Grebenstein

Dear List,

I've been fighting the whole night but I' can't get it fixed:

I have a simple and short file (to test why the big document 70 pages  
is not exported completely) which I want to export to latex. But if I  
do so, a portion of text is missing (in the tex file! So it doesn't  
seem to be related to latex setup?) If I export the same text to html  
it works fine.


I fixed the file encoding to utf 8 and checked encoding also using jedit.

.emacs tex- relevant part:
8

(add-to-list 'org-export-latex-classes
 '(book
 \\documentclass{book}
  (\\part{%s} . \\part*{%s})
   (\\chapter{%s} . \\chapter*{%s})
   (\\section{%s} . \\section*{%s})
   (\\subsection{%s} . \\subsection*{%s})
   (\\subsubsection{%s} . \\subsubsection*{%s}))
 )

(add-to-list 'org-export-latex-classes
 '(IEEEtran
   \\documentclass{IEEEtran}
;;   (\\part{%s} . \\part*{%s})
;;   (\\chapter{%s} . \\chapter*{%s})
   (\\section{%s} . \\section*{%s})
   (\\subsection{%s} . \\subsection*{%s})
   (\\subsubsection{%s} . \\subsubsection*{%s}))
 )


(add-to-list 'org-export-latex-classes
  '(djcb-org-article
\\documentclass[11pt,a4paper]{article}
\\usepackage[T1]{fontenc}
\\usepackage{fontspec}
\\usepackage{graphicx}
\\defaultfontfeatures{Mapping=tex-text}
\\setromanfont{Gentium}
\\setromanfont [BoldFont={Gentium Basic Bold},
ItalicFont={Gentium Basic Italic}]{Gentium Basic}
\\setsansfont{Charis SIL}
\\setmonofont[Scale=0.8]{DejaVu Sans Mono}
\\usepackage{geometry}
\\geometry{a4paper, textwidth=6.5in, textheight=10in,
marginparsep=7pt, marginparwidth=.6in}
\\pagestyle{empty}
\\title{}
  [NO-DEFAULT-PACKAGES]
  [NO-PACKAGES]
 (\\section{%s} . \\section*{%s})
 (\\subsection{%s} . \\subsection*{%s})
 (\\subsubsection{%s} . \\subsubsection*{%s})
 (\\paragraph{%s} . \\paragraph*{%s})
 (\\subparagraph{%s} . \\subparagraph*{%s})))

;; acitvate RefTex
;; Master Bib
(setq reftex-default-bibliography  
'(D:/grebenst/My_Info_Local/Daten/Diss/svn_grebi/trunk/DISS/Scrivener/Diss-zotero))



(setq reftex-cite-format 'natbib)
(defun my-org-mode-setup ()
 (when (and (buffer-file-name)
(file-exists-p (buffer-file-name)))
  (load-library reftex)
  (and (buffer-file-name)
(file-exists-p (buffer-file-name))
(reftex-parse-all))
   (reftex-set-cite-format
'((?N 'natbib)
(?b . [[bib::%l]])
   (?n . [[note::%l]])
   (?p . [[citep][%l]])
   (?c . [[cite][%l]])
   (?C . \\cite{%l}
   (define-key org-mode-map \C-c\C-g 'reftex-citation)
)
(add-hook 'org-mode-hook 'my-org-mode-setup)

;; Mehrerer Latex prozessoren
;; Aus Orgmode FAQS
;; LATEX_CMD auf nicht pdflatex oder xelatex setzen

(require 'org-latex)
(setq org-export-latex-listings t)

;; Originally taken from Bruno Tavernier:  
http://thread.gmane.org/gmane.emacs.orgmode/31150/focus=31432

;; but adapted to use latexmk 4.20 or higher.
(defun my-auto-tex-cmd ()
  When exporting from .org with latex, automatically run latex,
 pdflatex, or xelatex as appropriate, using latexmk.
  (let ((texcmd)))
  ;; default command: oldstyle latex via dvi
  (setq texcmd latexmk -dvi -pdfps -quiet %f)
  ;; pdflatex - .pdf
  (if (string-match LATEX_CMD: pdflatex (buffer-string))
  (setq texcmd latexmk -pdf -quiet %f))
  ;; xelatex - .pdf
  (if (string-match LATEX_CMD: xelatex (buffer-string))
  (setq texcmd latexmk -pdflatex=xelatex -pdf -quiet %f))
  ;; LaTeX compilation command
  (setq org-latex-to-pdf-process (list texcmd)))

(add-hook 'org-export-latex-after-initial-vars-hook 'my-auto-tex-cmd)


;; Specify default packages to be included in every tex file, whether  
pdflatex or xelatex

(setq org-export-latex-packages-alist
  '(( graphicx t)
( longtable nil)
( float nil)))

(defun my-auto-tex-parameters ()
  Automatically select the tex packages to include.
  ;; default packages for ordinary latex or pdflatex export
  (setq org-export-latex-default-packages-alist
'((AUTO inputenc t)
  (T1   fontenc   t)
  ( fixltx2e  nil)
  ( wrapfig   nil)
  ( soul  t)
  ( textcomp  t)
  ( marvosym  t)
  ( wasysym   t)
  ( latexsym  t)
  ( amssymb   t)
  ( hyperref  nil)))

  ;; Packages to include when xelatex is used
  (if (string-match LATEX_CMD: xelatex (buffer-string))
  (setq org-export-latex-default-packages-alist
'(( fontspec t)
  ( xunicode t)
  ( url t)
  ( rotating t)
  (american babel t)
  (babel csquotes t)
  ( soul t)

Re: [O] Export issue: Text not exportet to latex but to html (emacs23.2 windows and orgmode 7.7)

2011-08-28 Thread Nick Dokos
Markus Grebenstein p...@mgrebenstein.de wrote:

 Dear List,
 
 I've been fighting the whole night but I' can't get
 it fixed:
 
 I have a simple and short file (to test why the big
 document 70 pages is not exported completely) which
 I want to export to latex. But if I do so, a portion
 of text is missing (in the tex file! So it doesn't
 seem to be related to latex setup?)

Correct - orgmode and emacs setup are the primary
suspects.

 If I export the same text to html  
 it works fine.
 

I tried a minimal .emacs plus your .emacs
customizations (after fixing up some unfortunate line
breaks that the email suffered) and I get a good tex
file with no chapters missing (tex file attached).

Org-mode version 7.7 (release_7.7.205.gce02a)

GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+
Version 2.22.0) of 2011-07-30

You might want to check your version of orgmode and
upgrade if necessary, but the primary suspect is still
your configuration I think (maybe the rest of your
.emacs).

Nick

% Created 2011-08-28 Sun 12:30
\documentclass[a4paper,11pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\input{D:/grebenst/My_Info_Local/Daten/Diss/svn_grebi/trunk/DISS/Templates/book_header.tex}
\bibliography{Diss-zotero}
\providecommand{\alert}[1]{\textbf{#1}}

\title{Testfile fuer Orgmode spezifische Dinge zur Diss}
\author{Nick Dokos}
\date{\today}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}


\part{Section 1}
\label{sec-1}

HIer steht ein Bild

Hier ein Zitat in Latex syntax

Hier steht ein Zitat in orgmode markup

Hier eine Fussnote \footnote{Ich bin die Fussnote }
\part{Formatierungen}
\label{sec-2}

Warum fehlen denn hier schon wieder Dinge??
\chapter{Fuer Text}
\label{sec-2-1}

wumm das wieda nich geht??
\chapter{liegts an dem Markup  Zeuch?}
\label{sec-2-2}

asdf
Komisch ist das??

\printbibliography

\end{document}

 8-
 
 The orgmode file:
 
 8
 #+STARTUP: hidestars
 #+STARTUP:
 indent
 #+TODO: TODO | DONE
 #+TODO: FirstDraft RevisedDraft | Final
 #+OPTIONS: toc:4  *:t(only to two levels in TOC)
 ##+OPTIONS: toc:nil(no TOC at all)
 #+LATEX_CMD: pdflatex
 #+LaTeX_CLASS: book
 #+LaTeX_CLASS_OPTIONS: [a4paper,11pt]
 #+LATEX_HEADER:  
 \input{D:/grebenst/My_Info_Local/Daten/Diss/svn_grebi/trunk/DISS/Templates/book_header.tex}
 #+LaTeX_HEADER: \bibliography{Diss-zotero}
 
 #+TITLE: Testfile fuer Orgmode spezifische Dinge zur Diss
 
 * Section 1
 HIer steht ein Bild
 
 Hier ein Zitat in Latex syntax
 
 Hier steht ein Zitat in orgmode markup
 
 Hier eine Fussnote [fn:1_1]
 
 * Formatierungen
 Warum fehlen denn hier schon wieder Dinge??
 
 ** Fuer Text
 wumm das wieda nich geht??
 
 ** liegts an dem Markup  Zeuch?
 asdf
 Komisch ist das??
 
 [fn:1_1]Ich bin die Fussnote
 
 \printbibliography
 8