emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Markus Grebenstein <post@mgrebenstein.de>
To: emacs-orgmode@gnu.org
Subject: Export issue: Text not exportet to latex but to html (emacs23.2 windows and orgmode 7.7)
Date: Sat, 27 Aug 2011 14:30:46 +0200	[thread overview]
Message-ID: <20110827143046.Horde.-eL5WFNNcXdOWON22w9Dv-A@webmail.df.eu> (raw)

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)
                   ("xetex" "hyperref" nil)
                   )))

       (if (string-match "LATEX_CMD: xelatex" (buffer-string))
           (setq org-export-latex-classes
                 (cons '("article"
                         "\\documentclass[11pt,article,oneside]{memoir}"
                         ("\\section{%s}" . "\\section*{%s}")
                         ("\\subsection{%s}" . "\\subsection*{%s}")
                         ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
                         ("\\paragraph{%s}" . "\\paragraph*{%s}")
                         ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
                       org-export-latex-classes))))

(add-hook 'org-export-latex-after-initial-vars-hook 'my-auto-tex-parameters)
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><------------------------------------

The produced texfile (section 2.1 missing):

8><------------------------------------
% Created 2011-08-27 Sa 14:08
\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{}
\date{\today}

\begin{document}

\maketitle

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


\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??

\end{document}
8><---------------------------------------------------------
And the html file (complete text; section 2.1 not missing)
8><---------------------------------------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
lang="en" xml:lang="en">
<head>
<title>Testfile fuer Orgmode spezifische Dinge zur Diss</title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
<meta name="generator" content="Org-mode"/>
<meta name="generated" content="2011-08-27 14:29:28 "/>
<meta name="author" content=""/>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<style type="text/css">
  <!--/*--><![CDATA[/*><!--*/
   html { font-family: Times, serif; font-size: 12pt; }
   .title  { text-align: center; }
   .todo   { color: red; }
   .done   { color: green; }
   .tag    { background-color: #add8e6; font-weight:normal }
   .target { }
   .timestamp { color: #bebebe; }
   .timestamp-kwd { color: #5f9ea0; }
   .right  {margin-left:auto; margin-right:0px;  text-align:right;}
   .left   {margin-left:0px;  margin-right:auto; text-align:left;}
   .center {margin-left:auto; margin-right:auto; text-align:center;}
   p.verse { margin-left: 3% }
   pre {
	border: 1pt solid #AEBDCC;
	background-color: #F3F5F7;
	padding: 5pt;
	font-family: courier, monospace;
         font-size: 90%;
         overflow:auto;
   }
   table { border-collapse: collapse; }
   td, th { vertical-align: top;  }
   th.right  { text-align:center;  }
   th.left   { text-align:center;   }
   th.center { text-align:center; }
   td.right  { text-align:right;  }
   td.left   { text-align:left;   }
   td.center { text-align:center; }
   dt { font-weight: bold; }
   div.figure { padding: 0.5em; }
   div.figure p { text-align: center; }
   textarea { overflow-x: auto; }
   .linenr { font-size:smaller }
   .code-highlighted {background-color:#ffff00;}
   .org-info-js_info-navigation { border-style:none; }
   #org-info-js_console-label { font-size:10px; font-weight:bold;
                                white-space:nowrap; }
   .org-info-js_search-highlight {background-color:#ffff00; color:#000000;
                                  font-weight:bold; }
   /*]]>*/-->
</style>
<script type="text/javascript">
<!--/*--><![CDATA[/*><!--*/
  function CodeHighlightOn(elem, id)
  {
    var target = document.getElementById(id);
    if(null != target) {
      elem.cacheClassElem = elem.className;
      elem.cacheClassTarget = target.className;
      target.className = "code-highlighted";
      elem.className   = "code-highlighted";
    }
  }
  function CodeHighlightOff(elem, id)
  {
    var target = document.getElementById(id);
    if(elem.cacheClassElem)
      elem.className = elem.cacheClassElem;
    if(elem.cacheClassTarget)
      target.className = elem.cacheClassTarget;
  }
/*]]>*///-->
</script>

</head>
<body>
<div id="content">

<h1 class="title">Testfile fuer Orgmode spezifische Dinge zur Diss</h1>

<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1 Section 1 </a></li>
<li><a href="#sec-2">2 Formatierungen </a>
<ul>
<li><a href="#sec-2_1">2.1 Fuer Text </a></li>
<li><a href="#sec-2_2">2.2 liegts an dem Markup  Zeuch? </a></li>
</ul>
</li>
</ul>
</div>
</div>

<div id="outline-container-1" class="outline-2">
<h2 id="sec-1"><span class="section-number-2">1</span> Section 1 </h2>
<div class="outline-text-2" id="text-1">

<p>HIer steht ein Bild
</p>
<p>
Hier ein Zitat in Latex syntax
</p>
<p>
Hier steht ein Zitat in orgmode markup
</p>
<p>
Hier eine Fussnote <sup><a class="footref" name="fnr.1"  
href="#fn.1">1</a></sup>
</p>
</div>

</div>

<div id="outline-container-2" class="outline-2">
<h2 id="sec-2"><span class="section-number-2">2</span> Formatierungen </h2>
<div class="outline-text-2" id="text-2">

<p>Warum fehlen denn hier schon wieder Dinge??
</p>

</div>

<div id="outline-container-2_1" class="outline-3">
<h3 id="sec-2_1"><span class="section-number-3">2.1</span> Fuer Text </h3>
<div class="outline-text-3" id="text-2_1">

<p>wumm das wieda nich geht??
</p>
</div>

</div>

<div id="outline-container-2_2" class="outline-3">
<h3 id="sec-2_2"><span class="section-number-3">2.2</span> liegts an  
dem Markup  Zeuch? </h3>
<div class="outline-text-3" id="text-2_2">

<p>asdf
Komisch ist das??
</p>
<p>
\printbibliography
</p>

</div>
</div>
</div>
<div id="footnotes">
<h2 class="footnotes">Footnotes: </h2>
<div id="text-footnotes">
<p class="footnote"><sup><a class="footnum" name="fn.1"  
href="#fnr.1">1</a></sup> Ich bin die Fussnote
</p>
</div>
</div>
<div id="postamble">
<p class="author">Author: </p>
<p class="creator">Org version 7.7 with Emacs version 23</p>
<a href="http://validator.w3.org/check?uri=referer">Validate XHTML 1.0</a>
</div>
</div>
</body>
</html>
8><---------------------------------------------------------
Thanks a lot in advance for your help.

Best Regards,

Markus

             reply	other threads:[~2011-08-27 12:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-27 12:30 Markus Grebenstein [this message]
2011-08-28 16:40 ` Export issue: Text not exportet to latex but to html (emacs23.2 windows and orgmode 7.7) Nick Dokos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110827143046.Horde.-eL5WFNNcXdOWON22w9Dv-A@webmail.df.eu \
    --to=post@mgrebenstein.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).