Re: [O] BUG: ox-latex export pdf options issue

2017-06-30 Thread Robert Klein
Please disregard this.  \hypersetup works as it is.

I had a +text+ title which put a \sout{} in the pdftitle.  That caused a
error message about too many }'s from the pdflatex.  This I mistook to
mean the closing brace of \hypersetup.

Sorry about the fuss.

Best regards,
Robert


On Thu, 29 Jun 2017 14:28:26 +0200
Robert Klein  wrote:

> Hi,
> 
> The Latex \hypersetup options like to be on their own line and hate
> when the closing } intrudes on them.
> 
> Patch which puts the closing brace in its place below.
> 
> Best regards
> Robert
> 
> 
> 
> 
> diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
> index ec4b49585f8..474f9b6e9c4 100644
> --- a/lisp/ox-latex.el
> +++ b/lisp/ox-latex.el
> @@ -596,7 +596,7 @@ the toc:nil option, not to those generated with
> #+TOC keyword." 
>  (defcustom org-latex-hyperref-template
>"\\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n
> pdfkeywords={%k},
> - pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%L}}\n"
> + pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%L}\n}\n"
>"Template for hyperref package options.
>  
>  This format string may contain these elements:
> 




Re: [O] Bug in latex export figure labels?

2015-10-16 Thread Rasmus
Andreas Leha  writes:

> Maybe `org-latex-prefer-user-labels' deserves its own FAQ entry.

It should perhaps be mentioned explicitly in the manual as this topic pops
up too frequently.  A worg faq entry is also fine.

Feel free to submit a patch towards this end.

> Or a changed default value.

I disagree.

Rasmus

-- 
One thing that is clear: it's all down hill from here 




Re: [O] Bug in latex export figure labels?

2015-10-16 Thread garjola

Nicolas Goaziou  wrote:
> 
> Hello,
>> Am I doing something wrong?
>
> This is a feature. See `org-latex-prefer-user-labels'.
>
>

Oups! Thank you and apologies!
-- 
Dr. Dindi
Dad, Philosopher, Hacker



Re: [O] Bug in latex export figure labels?

2015-10-16 Thread Andreas Leha
Nicolas Goaziou  writes:
> Hello,
>
> garj...@garjola.net writes:
>
>> I am having issues when exporting to LaTeX using labels in figures. The
>> following snippet
>>
>>> > >
>>> #+CAPTION: Comparison >
>>> #+NAME:  fig:irreg2   >
>>> #+attr_latex: :width 0.9\textwidth :placement [H] >
>>> [[file:irregular_red.png]]>
>>> > >
>>
>> gets exported as (see the label)
>>
>>>  >
>>> \begin{figure}[H]>
>>> \centering   >
>>> \includegraphics[width=0.9\textwidth]{irregular_red.png} >
>>> \caption{\label{fig:orgparagraph1}   >
>>> Comparison}  >
>>> \end{figure} >
>>>  >
>>
>> instead of 
>>
>>>  >
>>> \begin{figure}[H]>
>>> \centering   >
>>> \includegraphics[width=0.9\textwidth]{irregular_red.png} >
>>> \caption{\label{fig:irreg2}Comparison}   >
>>> \end{figure} >
>>>  >
>>
>> I noticed this when updating the melpa package to the latest one. Using
>> the git repository I have tried several versions of org-mode and the
>> "bug" was introduced between release 8.2.9 and release 8.3. 
>>
>> Since I am a little bit surprised that this has not been noticed, I am
>> reluctant to say that this is a bug, but the same file gets exported
>> differently with these 2 releases.
>>
>> I have also tried to change +NAME to +LABEL and the result is the same.
>>
>> Am I doing something wrong?
>
> This is a feature. See `org-latex-prefer-user-labels'.
>

Maybe `org-latex-prefer-user-labels' deserves its own FAQ entry.

Or a changed default value.


Regards,
Andreas




Re: [O] Bug in latex export figure labels?

2015-10-16 Thread Nicolas Goaziou
Hello,

garj...@garjola.net writes:

> I am having issues when exporting to LaTeX using labels in figures. The
> following snippet
>
>> > >
>> #+CAPTION: Comparison >
>> #+NAME:  fig:irreg2   >
>> #+attr_latex: :width 0.9\textwidth :placement [H] >
>> [[file:irregular_red.png]]>
>> > >
>
> gets exported as (see the label)
>
>>  >
>> \begin{figure}[H]>
>> \centering   >
>> \includegraphics[width=0.9\textwidth]{irregular_red.png} >
>> \caption{\label{fig:orgparagraph1}   >
>> Comparison}  >
>> \end{figure} >
>>  >
>
> instead of 
>
>>  >
>> \begin{figure}[H]>
>> \centering   >
>> \includegraphics[width=0.9\textwidth]{irregular_red.png} >
>> \caption{\label{fig:irreg2}Comparison}   >
>> \end{figure} >
>>  >
>
> I noticed this when updating the melpa package to the latest one. Using
> the git repository I have tried several versions of org-mode and the
> "bug" was introduced between release 8.2.9 and release 8.3. 
>
> Since I am a little bit surprised that this has not been noticed, I am
> reluctant to say that this is a bug, but the same file gets exported
> differently with these 2 releases.
>
> I have also tried to change +NAME to +LABEL and the result is the same.
>
> Am I doing something wrong?

This is a feature. See `org-latex-prefer-user-labels'.


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug in LaTeX export with short captions

2015-09-10 Thread Nicolas Goaziou
Hello,

Suvayu Ali  writes:

> When I export the following table to latex,
>
>   #+name: tab:foo
>   #+caption[/s/-weights]: /s/-weights.
>   | A | B | C |D |
>   |---+---+---+--|
>   | 70347 | 10885 | 68502 | 4021 |
>   | 68458 | 20310 | 66683 | 5853 |
>   | 69418 | 22329 | 67617 | 6431 |
>   | 71336 | 28674 | 69479 | 8160 |
>
> I get the following:
>
>   \begin{table}[htb]
>   \caption[\emph{s}-weights]{\label{tab:foo}
>   weights]: \emph{s}-weights.}
>   \centering
>   \begin{tabular}{}
>   A & B & C & D\\
>   \hline
>   70347 & 10885 & 68502 & 4021\\
>   68458 & 20310 & 66683 & 5853\\
>   69418 & 22329 & 67617 & 6431\\
>   71336 & 28674 & 69479 & 8160\\
>   \end{tabular}
>   \end{table}
>
> Note the extra "weights]:" in the long caption.  This happens whenever
> there is some kind of emphasis in the short caption: /s/, *s*, etc.

Fixed. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] [BUG] org-latex-export fails in spanish language

2014-09-14 Thread Nicolas Goaziou
Hello,

davi...@es.gnu.org (David Arroyo Menéndez) writes:

 I'm exporting an org file to latex using the git repository. 

 In the org file I've added #+LANGUAGE: es in the header.

 The language options doesn't appear in tex file. IMHO is necessary add
 \usepackage[spanish]{babel}. I suppose that is a problem with
 org-latex-guess-babel-language. 

You need to put \usepackage[spanish]{babel} or
\usepackage[AUTO]{babel} in your header (with a keyword or in your
class definition).

Org doesn't load it automatically for you.


Regards,

-- 
Nicolas Goaziou



Re: [O] [BUG] org-latex-export fails in spanish language

2014-09-14 Thread David Arroyo Menéndez
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Hello,

 davi...@es.gnu.org (David Arroyo Menéndez) writes:

 I'm exporting an org file to latex using the git repository. 

 In the org file I've added #+LANGUAGE: es in the header.

 The language options doesn't appear in tex file. IMHO is necessary add
 \usepackage[spanish]{babel}. I suppose that is a problem with
 org-latex-guess-babel-language. 

 You need to put \usepackage[spanish]{babel} or
 \usepackage[AUTO]{babel} in your header (with a keyword or in your
 class definition).

 Org doesn't load it automatically for you.


 Regards,

Thanks, now the conversion is running. 

Regards.



Re: [O] Bug: subtree LaTeX export problems after upgrade [8.1 (8.1-elpa @ /home/brian/.emacs.d/elpa/org-20130906/)]

2013-09-23 Thread Brian Zbriger
Please disregard my recent bug report re: LaTeX exports... the problem was
entirely on my end.


Re: [O] [BUG][PATCH] latex export of links in description lists

2013-06-18 Thread Nicolas Goaziou
Hello,

Rick Frankel r...@rickster.com writes:

 There is a bug in the processing of description list.

 Given the list:

 ,
 | - not a link :: not a link
 | - [[http://link.com][http link]] :: baz
 | - [[#href-test][custom_id link]] :: bar
 | - [[def list][search link]] :: foo
 `

 The latex exporter generates the following output, which fails
 latex processing on the `hyperref's.

 ,
 | \begin{description}
 | \item[not a link] not a link
 | \item[\href{http://link.com}{http link}] baz
 | \item[\hyperref[sec-1]{custom\_id link}] bar
 | \item[\hyperref[sec-1]{search link}] foo
 | \end{description}
 `

 I believe the simplest patch to solve is to wrap the item argument in
 braces as follows:

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] bug in latex export?

2013-04-28 Thread Nicolas Goaziou
Hello,

renato renn...@gmail.com writes:

 this in the .org file

 \begin{theoremwithname}[hei]
 theorem
 \begin{align*}
 2+2
 \end{align*}
 \end{theoremwithname}

 gets latex-exported to this (note that after \endtheoremwithname
 everything is replicated with escape characters):

This should be fixed. Thank you for reporting it.


Regards,

-- 
Nicolas Goaziou



Re: [O] bug in latex export?

2013-04-27 Thread Suvayu Ali
On Sat, Apr 27, 2013 at 12:05:37PM +0200, renato wrote:
 Hi, don't know if this has allready been reported, but I just upgraded
 to 8.0 and I stumped into this...
 
 this in the .org file
 
 \begin{theoremwithname}[hei]
 theorem
 \begin{align*}
 2+2
 \end{align*}
 \end{theoremwithname}

I think only basic macros are supported.  You could just wrap the above
in a #+begin_latex..#+end_latex block.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Bug(?) in LaTeX export?

2013-01-30 Thread Thorsten Jolitz
t...@tsdye.com (Thomas S. Dye) writes:

Hi Tom,

 I do have org-export-latex-listings set to nil, and it gives me the
 results I think you're looking for--a no fuss export of some source
 code.  The corresponding variable in the new exporter is
 org-e-latex-listings.  

thats probably what I want - and what I had before.

 Both of these variables are set to nil by default.  Perhaps you are
 setting one of these in .emacs, or there is an old customization?

sometimes I copy large chunks of Emacs configuration from other people,
I'm pretty sure in one of those chunks these variables were set. I have
to check. 

Thanks.

-- 
cheers,
Thorsten




Re: [O] Bug(?) in LaTeX export?

2013-01-29 Thread Thomas S. Dye
Aloha Thorsten,

Thorsten Jolitz tjol...@googlemail.com writes:

 Hi List, 

 when I export an Org file with Source blocks to LaTeX (:exports code),
 the blocks are converted into environments of package 'listings':


What is the value of the variable org-export-latex-listings?  If it is
'listings or 'minted, then there is quite a bit of setup required for
all the parts to work together correctly (see
http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12). 

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] Bug(?) in LaTeX export?

2013-01-29 Thread Thorsten Jolitz
t...@tsdye.com (Thomas S. Dye) writes:

Hi Tom,

 What is the value of the variable org-export-latex-listings? 

,---
| org-export-latex-listings's value is t
`---

 If it is 'listings or 'minted, then there is quite a bit of setup
 required for all the parts to work together correctly (see
 http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12).

Thats quite some stuff to digest, does that hold for both, the new and
the old exporter? In this case I just wanted a quick LaTeX export with
the default settings, however ugly or unsatisfactoy, and I remember that
this used to work. 

I will have a deeper look, thanks. 

-- 
cheers,
Thorsten




Re: [O] Bug(?) in LaTeX export?

2013-01-29 Thread Thomas S. Dye
Hi Thorsten,

Thorsten Jolitz tjol...@googlemail.com writes:

 t...@tsdye.com (Thomas S. Dye) writes:

 Hi Tom,

 What is the value of the variable org-export-latex-listings? 

 ,---
 | org-export-latex-listings's value is t
 `---

 If it is 'listings or 'minted, then there is quite a bit of setup
 required for all the parts to work together correctly (see
 http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12).

 Thats quite some stuff to digest, does that hold for both, the new and
 the old exporter? In this case I just wanted a quick LaTeX export with
 the default settings, however ugly or unsatisfactoy, and I remember that
 this used to work. 

I haven't exported fancy listings with the new exporter yet, so I can't
answer your question.  

I do have org-export-latex-listings set to nil, and it gives me the
results I think you're looking for--a no fuss export of some source
code.  The corresponding variable in the new exporter is
org-e-latex-listings.  

Both of these variables are set to nil by default.  Perhaps you are
setting one of these in .emacs, or there is an old customization?

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] Bug in latex export

2011-11-28 Thread Markus Grebenstein
Nobody out there able to reproduce? I still have trouble with this on  
org-mode 7.7 and ubuntu 11.10.


Best Markus





Re: [O] Bug Report: latex export interaction with inlinetasks

2011-10-13 Thread Nicolas Goaziou
Hello,

Colin Fraizer orgm...@cfraizer.com writes:

 Please pardon my ignorance, but I don't know how to generate a patch for
 distribution.

You have all instructions you want at:

  http://orgmode.org/worg/org-contribute.html

If you don't want/can't follow them, please tell me. I will push your
patch.

 Since I sent that e-mail, I added a few more items from the opt-plist to
 include :todo, :todo-keywords, :tags, and :priority.

I see, but you also included changes not directly related to the
thread's subject (i.e. changes to verbatim environment). Be sure to
filter them out if you create the patch.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug Report: latex export interaction with inlinetasks

2011-10-09 Thread Nicolas Goaziou
Hello,

Colin Fraizer orgm...@cfraizer.com writes:

 I have a file like this:

  

 * Item 1

   - list1a

   - list1b

 * Item 2

   - list2a

 *** TODO Test

 *** END

   - list2b

 * Item 3

  

 (1)If I export the whole file to LaTeX, everything works fine.

 (2)If I export the subtree * Item 2 to HTML, everything works fine.
 (I see my list and the inlinetask in that list.)

 (3)If I export the subtree * Item 2 to LaTeX, the inlinetask is
 removed. (All inlinetasks are removed from list2.)


 This is apparently caused by the fact that:

 1.   org-export-latex-first-lines matches all of list2 (because there
 are no headlines under * Item 2); AND

 2.   org-export-preprocess-string is called with limited parameters on
 those first lines. Those parameters do not include my value for :tasks.

 Is there a reason why we could not (or should not) change the defun
 org-export-latex-first-lines like the following.  I only add the line

 :tasks (plist-get opt-plist :tasks)

 I'm not familiar enough with the guts of org to know if that will have
 terrible consequences elsewhere.

 (defun org-export-latex-first-lines (opt-plist optional beg end)
:
:
   (prog1
  (org-export-latex-content
   (org-export-preprocess-string
(buffer-substring pt end)
:for-backend 'latex
:emph-multiline t
:add-text nil
:comments nil
:skip-before-1st-heading nil
:LaTeX-fragments nil
:tasks (plist-get opt-plist :tasks)  ;; *** I PROPOSE ADDING THIS 
 LINE
:timestamps (plist-get opt-plist :timestamps)
:footnotes (plist-get opt-plist :footnotes)))
:
:
) ; end of defun

I think this should be safe. Do you want to make a patch for that?

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug? in latex export of cross-references in footnotes

2011-10-09 Thread Nicolas Goaziou
Hello,

Robert Goldman rpgold...@sift.info writes:

 On 9/26/11 Sep 26 -2:26 PM, Robert Goldman wrote:
 Here is a simple footnote in a test file:
 
 Footnotes:
 [1]  The footnote contains a cross-reference to [[Heading]].
 
 When I export this using org-export-as-pdf, the cross-reference to
 Heading doesn't get exported properly.  In particular, what I see in the
 emitted latex file is:
 
 Inside the text there is a footnote.\protect\footnote{The footnote
 contains a cross-reference to \hyperref[Heading]{Heading}. }
 
 But the only latex \label associated with \section{Heading} is
 \label{sec-1}.
 
 I am attaching the sample org file and latex output.
 
 Thanks for any suggestions!
 
 Robert

 I tweaked the example a little (see attachment), and this is a bona fide
 bug.  A corresponding link in the body text (I have modified the link to
 use the restricted to headers syntax, just in case that was the
 problem), works properly.  It's only in the footnote that it's broken.

Yes, managing internal links within a footnote is a non-trivial task in
the LaTeX exporter. I'm working on a different approach.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug Report: latex export interaction with inlinetasks

2011-10-09 Thread Colin Fraizer
Hi, Nicolas,

Please pardon my ignorance, but I don't know how to generate a patch for
distribution.

Since I sent that e-mail, I added a few more items from the opt-plist to
include :todo, :todo-keywords, :tags, and :priority.

The output from diff for my new version against the one I grabbed from the
git repository follows (enclosed in an org example block).

--Colin

#+begin_example
3c3
 ;; Copyright (C) 2007-2011 Free Software Foundation, Inc.
---
 ;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
7c7,8
 ;; Author: Bastien Guerry bzg AT gnu DOT org
---
 ;; Version: 7.7
 ;; Author: Bastien Guerry bzg AT altern DOT org
404c405
   '(\\begin{verbatim}\n . \\end{verbatim})
---
   '(\\begin{verbatim}\n . \\end{verbatim}\n)
1472a1474,1478
 :tasks (plist-get opt-plist :tasks)
 :todo (plist-get opt-plist :todo)
 :todo-keywords (plist-get opt-plist :todo-keywords)
 :tags (plist-get opt-plist :tags)
 :priority (plist-get opt-plist :priority)
1839c1845
   (insert \\end{verbatim}\n))
---
   (insert \\end{verbatim}\n\n))
2769a2776,2777
 
 ;; arch-tag: 23c2b87d-da04-4c2d-ad2d-1eb6487bc3ad
#+end_example

-Original Message-
From: emacs-orgmode-bounces+orgmode=cfraizer@gnu.org
[mailto:emacs-orgmode-bounces+orgmode=cfraizer@gnu.org] On Behalf Of
Nicolas Goaziou
Sent: Sunday, October 09, 2011 8:06 AM
To: Colin Fraizer
Cc: emacs-orgmode@gnu.org
Subject: Re: [O] Bug Report: latex export interaction with inlinetasks

Hello,

Colin Fraizer orgm...@cfraizer.com writes:

 I have a file like this:

  

 * Item 1

   - list1a

   - list1b

 * Item 2

   - list2a

 *** TODO Test

 *** END

   - list2b

 * Item 3

  

 (1)If I export the whole file to LaTeX, everything works fine.

 (2)If I export the subtree * Item 2 to HTML, everything works fine.
 (I see my list and the inlinetask in that list.)

 (3)If I export the subtree * Item 2 to LaTeX, the inlinetask is
 removed. (All inlinetasks are removed from list2.)


 This is apparently caused by the fact that:

 1.   org-export-latex-first-lines matches all of list2 (because there
 are no headlines under * Item 2); AND

 2.   org-export-preprocess-string is called with limited parameters on
 those first lines. Those parameters do not include my value for :tasks.

 Is there a reason why we could not (or should not) change the defun 
 org-export-latex-first-lines like the following.  I only add the line

 :tasks (plist-get opt-plist :tasks)

 I'm not familiar enough with the guts of org to know if that will have 
 terrible consequences elsewhere.

 (defun org-export-latex-first-lines (opt-plist optional beg end)
:
:
   (prog1
  (org-export-latex-content
   (org-export-preprocess-string
(buffer-substring pt end)
:for-backend 'latex
:emph-multiline t
:add-text nil
:comments nil
:skip-before-1st-heading nil
:LaTeX-fragments nil
:tasks (plist-get opt-plist :tasks)  ;; *** I PROPOSE ADDING
THIS LINE
:timestamps (plist-get opt-plist :timestamps)
:footnotes (plist-get opt-plist :footnotes)))
:
:
) ; end of defun

I think this should be safe. Do you want to make a patch for that?

Regards,

--
Nicolas Goaziou





Re: [O] Bug? in latex export of cross-references in footnotes

2011-09-26 Thread Robert Goldman
On 9/26/11 Sep 26 -2:26 PM, Robert Goldman wrote:
 Here is a simple footnote in a test file:
 
 Footnotes:
 [1]  The footnote contains a cross-reference to [[Heading]].
 
 When I export this using org-export-as-pdf, the cross-reference to
 Heading doesn't get exported properly.  In particular, what I see in the
 emitted latex file is:
 
 Inside the text there is a footnote.\protect\footnote{The footnote
 contains a cross-reference to \hyperref[Heading]{Heading}. }
 
 But the only latex \label associated with \section{Heading} is
 \label{sec-1}.
 
 I am attaching the sample org file and latex output.
 
 Thanks for any suggestions!
 
 Robert

I tweaked the example a little (see attachment), and this is a bona fide
bug.  A corresponding link in the body text (I have modified the link to
use the restricted to headers syntax, just in case that was the
problem), works properly.  It's only in the footnote that it's broken.

* Heading
* Another heading
* Some text
Inside the text there is a footnote.[1]
* Some more text
Here's text with a link in the body: [[*Heading]].

Footnotes: 
[1]  The footnote contains a cross-reference to [[*Heading]].



footnote-crossref.tex
Description: TeX document


Re: [O] Bug: failed latex-export [7.7]

2011-08-27 Thread Achim Gratz
Oliver Gerlach o.gerl...@googlemail.com writes:
 I expect a complete tex file without this bug message:

 Export buffer:
 Exporting to LaTeX...
 org-export-latex-subcontent: Symbol's function definition is void: nil
 Auto-saving...
 Mark set

 Do you have some suggestions what to do?

I cannot reproduce this.  Since I don't think that version 7.7 comes
with your version of emacs, you might be picking up an older version of
org-install or otherwise having a mix of an older vs. newer Org version.


Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Waldorf MIDI Implementation  additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs




Re: [O] Bug in latex export tutorial on worg ?

2011-05-10 Thread Robert Goldman
On 5/10/11 May 10 -12:25 AM, Thomas S. Dye wrote:
 Robert Goldman rpgold...@sift.info writes:
 
 On 5/9/11 May 9 -11:22 PM, Nick Dokos wrote:
 Robert Goldman rpgold...@sift.info wrote:

 On 5/9/11 May 9 -9:54 PM, Nick Dokos wrote:
 Robert Goldman rpgold...@sift.info wrote:

 There is the following code block there:

 #+begin_src emacs-lisp :results silent
   (add-to-list 'org-export-latex-classes
   '(per-file-class
  \\documentclass{scrartcl}
  [NO-DEFAULT-PACKAGES]
  [EXTRA]
  (\\section{%s} . \\section*{%s})
  (\\subsection{%s} . \\subsection*{%s})
  (\\subsubsection{%s} . \\subsubsection*{%s})
  (\\paragraph{%s} . \\paragraph*{%s})
  (\\subparagraph{%s} . \\subparagraph*{%s})))
 #+end_src

 Is this still correct?  Or should this be :exports none instead of
 :results silent?


 ``:results silent'' works for me and keeps the result from appearing in
 the org buffer. I don't think :exports can do that - it can only affect
 what's exported.

 Nick

 I must be doing something wrong then --- I had the :results silent and
 found the source block in verbatim in my latex export file  Changing
 to :exports none made that go away for me.  Maybe that was a
 coincidence.  I will have to investigate further, I guess.


 No, you are not doing anything wrong: the default :exports value is
 code, so the code ends up in your export. ``:exports none'' keeps it
 (and any results) from being exported.

 OTOH, try evaluating (C-c C-c) the code block, with and without
 ``:results silent''. There is a behavior difference and *that* difference
 is not affected by how you set :exports.

 Nick

 Ah.  I get it now.  But then surely the above IS a bug -- presumably
 it's not usual for a person to wish their latex export configuration to
 appear, in verbatim block, in their org-generated latex document!

 Best,
 Robert



 
 Aloha Robert,
 
 I've added :exports none to the example, which came from a document
 about how to export LaTeX documents from Org-mode.  Thanks for pointing
 out that it could be used in a way that yields unexpected results.
 
 In my usual setup I put this kind of configuration in a heading of its
 own that is protected by a :noexport: tag.  This works for me because I
 often have notes about why things are in there and what I think they
 might be doing.

Great!  Thanks.  Your tutorial has been very helpful to me.  I needed to
figure out how to set up a special-purpose format for my document and in
a moment I had just the solution I needed.

I suppose one could do...

(unless (find per-file-class org-export-latex-classes :key 'car
   :test 'equal)
  (add-to-list 'org-export-latex-classes
  '(per-file-class
 \\documentclass{scrartcl}
 [NO-DEFAULT-PACKAGES]
 [EXTRA]
 (\\section{%s} . \\section*{%s})
 (\\subsection{%s} . \\subsection*{%s})
 (\\subsubsection{%s} . \\subsubsection*{%s})
 (\\paragraph{%s} . \\paragraph*{%s})
 (\\subparagraph{%s} . \\subparagraph*{%s}

since the add-to-list is a globally side-effecting action; it doesn't
need to be repeated on each export, right?  [I thought at first pushnew
could do the job, but now I don't think so.]

Best,
R



Re: [O] Bug in latex export tutorial on worg ?

2011-05-10 Thread Thomas S. Dye
Robert Goldman rpgold...@sift.info writes:

 On 5/10/11 May 10 -12:25 AM, Thomas S. Dye wrote:
 Robert Goldman rpgold...@sift.info writes:
 
 On 5/9/11 May 9 -11:22 PM, Nick Dokos wrote:
 Robert Goldman rpgold...@sift.info wrote:

 On 5/9/11 May 9 -9:54 PM, Nick Dokos wrote:
 Robert Goldman rpgold...@sift.info wrote:

 There is the following code block there:

 #+begin_src emacs-lisp :results silent
   (add-to-list 'org-export-latex-classes
   '(per-file-class
  \\documentclass{scrartcl}
  [NO-DEFAULT-PACKAGES]
  [EXTRA]
  (\\section{%s} . \\section*{%s})
  (\\subsection{%s} . \\subsection*{%s})
  (\\subsubsection{%s} . \\subsubsection*{%s})
  (\\paragraph{%s} . \\paragraph*{%s})
  (\\subparagraph{%s} . \\subparagraph*{%s})))
 #+end_src

 Is this still correct?  Or should this be :exports none instead of
 :results silent?


 ``:results silent'' works for me and keeps the result from appearing in
 the org buffer. I don't think :exports can do that - it can only affect
 what's exported.

 Nick

 I must be doing something wrong then --- I had the :results silent and
 found the source block in verbatim in my latex export file  Changing
 to :exports none made that go away for me.  Maybe that was a
 coincidence.  I will have to investigate further, I guess.


 No, you are not doing anything wrong: the default :exports value is
 code, so the code ends up in your export. ``:exports none'' keeps it
 (and any results) from being exported.

 OTOH, try evaluating (C-c C-c) the code block, with and without
 ``:results silent''. There is a behavior difference and *that* difference
 is not affected by how you set :exports.

 Nick

 Ah.  I get it now.  But then surely the above IS a bug -- presumably
 it's not usual for a person to wish their latex export configuration to
 appear, in verbatim block, in their org-generated latex document!

 Best,
 Robert



 
 Aloha Robert,
 
 I've added :exports none to the example, which came from a document
 about how to export LaTeX documents from Org-mode.  Thanks for pointing
 out that it could be used in a way that yields unexpected results.
 
 In my usual setup I put this kind of configuration in a heading of its
 own that is protected by a :noexport: tag.  This works for me because I
 often have notes about why things are in there and what I think they
 might be doing.

 Great!  Thanks.  Your tutorial has been very helpful to me.  I needed to
 figure out how to set up a special-purpose format for my document and in
 a moment I had just the solution I needed.

 I suppose one could do...

 (unless (find per-file-class org-export-latex-classes :key 'car
:test 'equal)
   (add-to-list 'org-export-latex-classes
   '(per-file-class
  \\documentclass{scrartcl}
  [NO-DEFAULT-PACKAGES]
  [EXTRA]
  (\\section{%s} . \\section*{%s})
  (\\subsection{%s} . \\subsection*{%s})
  (\\subsubsection{%s} . \\subsubsection*{%s})
  (\\paragraph{%s} . \\paragraph*{%s})
  (\\subparagraph{%s} . \\subparagraph*{%s}

 since the add-to-list is a globally side-effecting action; it doesn't
 need to be repeated on each export, right?  [I thought at first pushnew
 could do the job, but now I don't think so.]

 Best,
 R


Aloha Robert,

Many thanks for this improvement to the example code.  I've added it to
the tutorial (and to my own bits of setup code).

All the best,
Tom

-- 
T.S. Dye  Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



Re: [O] Bug in latex export tutorial on worg ?

2011-05-09 Thread Nick Dokos
Robert Goldman rpgold...@sift.info wrote:

 There is the following code block there:
 
 #+begin_src emacs-lisp :results silent
   (add-to-list 'org-export-latex-classes
   '(per-file-class
  \\documentclass{scrartcl}
  [NO-DEFAULT-PACKAGES]
  [EXTRA]
  (\\section{%s} . \\section*{%s})
  (\\subsection{%s} . \\subsection*{%s})
  (\\subsubsection{%s} . \\subsubsection*{%s})
  (\\paragraph{%s} . \\paragraph*{%s})
  (\\subparagraph{%s} . \\subparagraph*{%s})))
 #+end_src
 
 Is this still correct?  Or should this be :exports none instead of
 :results silent?
 

``:results silent'' works for me and keeps the result from appearing in
the org buffer. I don't think :exports can do that - it can only affect
what's exported.

Nick



Re: [O] Bug in latex export tutorial on worg ?

2011-05-09 Thread Robert Goldman
On 5/9/11 May 9 -11:22 PM, Nick Dokos wrote:
 Robert Goldman rpgold...@sift.info wrote:
 
 On 5/9/11 May 9 -9:54 PM, Nick Dokos wrote:
 Robert Goldman rpgold...@sift.info wrote:

 There is the following code block there:

 #+begin_src emacs-lisp :results silent
   (add-to-list 'org-export-latex-classes
   '(per-file-class
  \\documentclass{scrartcl}
  [NO-DEFAULT-PACKAGES]
  [EXTRA]
  (\\section{%s} . \\section*{%s})
  (\\subsection{%s} . \\subsection*{%s})
  (\\subsubsection{%s} . \\subsubsection*{%s})
  (\\paragraph{%s} . \\paragraph*{%s})
  (\\subparagraph{%s} . \\subparagraph*{%s})))
 #+end_src

 Is this still correct?  Or should this be :exports none instead of
 :results silent?


 ``:results silent'' works for me and keeps the result from appearing in
 the org buffer. I don't think :exports can do that - it can only affect
 what's exported.

 Nick

 I must be doing something wrong then --- I had the :results silent and
 found the source block in verbatim in my latex export file  Changing
 to :exports none made that go away for me.  Maybe that was a
 coincidence.  I will have to investigate further, I guess.

 
 No, you are not doing anything wrong: the default :exports value is
 code, so the code ends up in your export. ``:exports none'' keeps it
 (and any results) from being exported.
 
 OTOH, try evaluating (C-c C-c) the code block, with and without
 ``:results silent''. There is a behavior difference and *that* difference
 is not affected by how you set :exports.
 
 Nick

Ah.  I get it now.  But then surely the above IS a bug -- presumably
it's not usual for a person to wish their latex export configuration to
appear, in verbatim block, in their org-generated latex document!

Best,
Robert




Re: [O] Bug in latex export tutorial on worg ?

2011-05-09 Thread Nick Dokos
Robert Goldman rpgold...@sift.info wrote:

 Ah.  I get it now.  But then surely the above IS a bug -- presumably
 it's not usual for a person to wish their latex export configuration to
 appear, in verbatim block, in their org-generated latex document!
 

Perhaps not in most cases, but a tutorial has to do exactly that: how
else is it going to show the reader what needs to be done? Certainly
not by omitting the code that the reader is supposed to use.

Nick




Re: [O] Bug in latex export tutorial on worg ?

2011-05-09 Thread Thomas S. Dye
Robert Goldman rpgold...@sift.info writes:

 On 5/9/11 May 9 -11:22 PM, Nick Dokos wrote:
 Robert Goldman rpgold...@sift.info wrote:
 
 On 5/9/11 May 9 -9:54 PM, Nick Dokos wrote:
 Robert Goldman rpgold...@sift.info wrote:

 There is the following code block there:

 #+begin_src emacs-lisp :results silent
   (add-to-list 'org-export-latex-classes
   '(per-file-class
  \\documentclass{scrartcl}
  [NO-DEFAULT-PACKAGES]
  [EXTRA]
  (\\section{%s} . \\section*{%s})
  (\\subsection{%s} . \\subsection*{%s})
  (\\subsubsection{%s} . \\subsubsection*{%s})
  (\\paragraph{%s} . \\paragraph*{%s})
  (\\subparagraph{%s} . \\subparagraph*{%s})))
 #+end_src

 Is this still correct?  Or should this be :exports none instead of
 :results silent?


 ``:results silent'' works for me and keeps the result from appearing in
 the org buffer. I don't think :exports can do that - it can only affect
 what's exported.

 Nick

 I must be doing something wrong then --- I had the :results silent and
 found the source block in verbatim in my latex export file  Changing
 to :exports none made that go away for me.  Maybe that was a
 coincidence.  I will have to investigate further, I guess.

 
 No, you are not doing anything wrong: the default :exports value is
 code, so the code ends up in your export. ``:exports none'' keeps it
 (and any results) from being exported.
 
 OTOH, try evaluating (C-c C-c) the code block, with and without
 ``:results silent''. There is a behavior difference and *that* difference
 is not affected by how you set :exports.
 
 Nick

 Ah.  I get it now.  But then surely the above IS a bug -- presumably
 it's not usual for a person to wish their latex export configuration to
 appear, in verbatim block, in their org-generated latex document!

 Best,
 Robert




Aloha Robert,

I've added :exports none to the example, which came from a document
about how to export LaTeX documents from Org-mode.  Thanks for pointing
out that it could be used in a way that yields unexpected results.

In my usual setup I put this kind of configuration in a heading of its
own that is protected by a :noexport: tag.  This works for me because I
often have notes about why things are in there and what I think they
might be doing.

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] Bug in latex export tutorial on worg ?

2011-05-09 Thread Nick Dokos
Nick Dokos nicholas.do...@hp.com wrote:

 Robert Goldman rpgold...@sift.info wrote:
 
  Ah.  I get it now.  But then surely the above IS a bug -- presumably
  it's not usual for a person to wish their latex export configuration to
  appear, in verbatim block, in their org-generated latex document!
  
 
 Perhaps not in most cases, but a tutorial has to do exactly that: how
 else is it going to show the reader what needs to be done? Certainly
 not by omitting the code that the reader is supposed to use.
 

After Tom's reply, I went and looked at the example and now I get it
too :-) Sorry for being dense before.

Nick



Re: [O] Bug in latex export of links

2011-05-01 Thread Robert Goldman
On 4/29/11 Apr 29 -4:07 PM, Robert Goldman wrote:
 I have this header in my org-mode file:
 
  Documentation documentationPseudoProp
 
 it gets translated into the following, which formats poorly:
 
 \item Documentation \label{documentationPseudoProp}documentationPseudoProp\\
 
 Any idea why this would happen?  Seems like a bona fide bug, but perhaps
 I'm just doing something wrong.

This block of org-latex seems to have the problem in it:

  (while (re-search-forward
  (concat ? org-export-latex-all-targets-re
  ?\\((INVISIBLE)\\)?) nil t)
(org-if-unprotected-at (+ (match-beginning 0) 2)
  (replace-match
   (concat
(org-export-latex-protect-string
 (format \\label{%s} (save-match-data (org-solidify-link-text
 (match-string 1)
*   (if (match-string 2)  (match-string 1)))
   t t)))

I suspect that the INVISIBLE up there indicates some way I am supposed
to flag this as a non-printing link, but there's no documentation
(AFAICT) about this.  Anyone know what that's supposed to do?

The manual suggests putting these targets in comments, but that only
works for HTML export --- if you do that in LaTeX export, the \label{}
command gets commented out!  Finding a solution that works equally well
in HTML and LaTeX export would be a good thing, I think.

Commenting out the starred s-expression in the block above would
probably fix my problem, but I have no way of telling what collateral
damage there might be.  Can anyone clarify?

If someone can fill me in, I will supply a patch to either the manual or
the code, whichever is appropriate

thanks!
r



Re: [O] bug in latex export tutorial?

2011-04-30 Thread Eric S Fraga
Robert Goldman rpgold...@sift.info writes:

 On 4/29/11 Apr 29 -1:21 PM, Nick Dokos wrote:

[...]

 amsmath conflicts with wasysym (redefines \iint), so you have to
 redefine your headers to omit wasysym or include amsmath *first*: for
 some reason, if you \usepackage{amsmath} *before* you
 \usepackage{wasysym}, the error does not arise -- presumably, amsmath
 assumes that \iint is not defined beforehand, whereas wasysym does not
 make that assumption.

 The not-very-tasty solution I came up with was to put the following into
 the local variables list at the foot of my file:

 # org-export-latex-default-packages-alist: ((AUTO inputenc t) (T1
 fontenc t) ( fixltx2e nil) ( graphicx t) ( longtable nil)
 ( float nil) ( wrapfig nil) ( soul t) ( t1enc t) (
 textcomp t) ( marvosym t) ( amsmath t) ( wasysym t) (
 latexsym t) ( amssymb t)
 (colorlinks=true,pdfstartview=FitV,linkcolor=blue,citecolor=blue,urlcolor=blue
 hyperref nil) \\tolerance=1000)

 I put this in the file, rather than in my configuration, because it is
 specific to the formatting of this file, and because I share this
 document with others, who need to be able to export from it w/o having
 to reconfigure their org-mode installations.

 I figure that someone can probably suggest a solution that is nicer than
 that!

 Best,
 r

From earlier this year on the mailing list, below is a solution
which works if you more often than not want amsmath; i.e. it's not a
solution for the use case you specify in which you want to share a
single file etc.  However, it's worth repeating this solution for other
use cases.

--8---cut here---start-8---
;; to fix problems with amsmath conflicting with wasysym:
;;
;; From: Lawrence Mitchell we...@gmx.li
;; Subject: [Orgmode] Re: [bug] latex export ignores 
org-export-latex-default-packages-alist?
;; To: emacs-orgmode@gnu.org
;; Date: Wed, 26 Jan 2011 16:01:52 +
(add-to-list 'org-export-latex-packages-alist '( amsmath t))
(setcar (rassoc '(wasysym t) org-export-latex-default-packages-alist) 
integrals)
--8---cut here---end---8---

HTH,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.226.gc7ed6.dirty)



Re: [O] bug in latex export tutorial?

2011-04-29 Thread Thomas S. Dye

Aloha Robert,

Yep.  It should be One of these, amssymb, requires amsmath, which  
conflicts with several LaTeX fonts.


Thanks for pointing this out.

All the best,
Tom

On Apr 29, 2011, at 6:26 AM, Robert Goldman wrote:


The document http://orgmode.org/worg/org-tutorials/org-latex-export.html
claims

The Org-mode LaTeX exporter uses several packages to support special
characters used by org-entities. One of these, amsmath, conflicts with
several LaTeX fonts. If you want finer control over which packages are
loaded, then it makes sense to define an export class like this  
in .emacs:


But I just checked the results of exporting one of my org files, and  
it

does /not/ use amsmath.

Is this a bug in the tutorial?







Re: [O] bug in latex export tutorial?

2011-04-29 Thread Robert Goldman
On 4/29/11 Apr 29 -11:44 AM, Thomas S. Dye wrote:
 Aloha Robert,
 
 Yep.  It should be One of these, amssymb, requires amsmath, which
 conflicts with several LaTeX fonts.

I don't /believe/ amssymb requires amsmath.  I have been working on a
document where I wanted to use some of the stuff in amsmath (e.g.,
\text, align environment).  That document did /not/ parse, even though
amssymb *is* in the preamble of the exported file.  I looked, and the
preamble has amssymb, but not amsmath.

It would be *great* if someone could provide tutorial information that
would tell us:

1.  How do we configure a file so that it *can* use amsmath?
2.  What happens to the parallel HTML export if we use amsmath
constructs in an org file?

thanks!
r

 
 Thanks for pointing this out.
 
 All the best,
 Tom
 
 On Apr 29, 2011, at 6:26 AM, Robert Goldman wrote:
 
 The document http://orgmode.org/worg/org-tutorials/org-latex-export.html
 claims

 The Org-mode LaTeX exporter uses several packages to support special
 characters used by org-entities. One of these, amsmath, conflicts with
 several LaTeX fonts. If you want finer control over which packages are
 loaded, then it makes sense to define an export class like this in
 .emacs:

 But I just checked the results of exporting one of my org files, and it
 does /not/ use amsmath.

 Is this a bug in the tutorial?


 




Re: [O] bug in latex export tutorial?

2011-04-29 Thread Thomas S. Dye

Aloha Robert,

You're right again.  Sorry for the noise.  The amssymb package is the  
source of the font conflicts.


Thanks for pointing this out.

I don't use amsmath, so can't help with your queries.  When you've  
sorted them out, please consider adding the solution to the LaTeX  
export tutorial.


All the best,
Tom

On Apr 29, 2011, at 6:51 AM, Robert Goldman wrote:


On 4/29/11 Apr 29 -11:44 AM, Thomas S. Dye wrote:

Aloha Robert,

Yep.  It should be One of these, amssymb, requires amsmath, which
conflicts with several LaTeX fonts.


I don't /believe/ amssymb requires amsmath.  I have been working on a
document where I wanted to use some of the stuff in amsmath (e.g.,
\text, align environment).  That document did /not/ parse, even though
amssymb *is* in the preamble of the exported file.  I looked, and the
preamble has amssymb, but not amsmath.

It would be *great* if someone could provide tutorial information that
would tell us:

1.  How do we configure a file so that it *can* use amsmath?
2.  What happens to the parallel HTML export if we use amsmath
constructs in an org file?

thanks!
r



Thanks for pointing this out.

All the best,
Tom

On Apr 29, 2011, at 6:26 AM, Robert Goldman wrote:


The document http://orgmode.org/worg/org-tutorials/org-latex-export.html
claims

The Org-mode LaTeX exporter uses several packages to support  
special
characters used by org-entities. One of these, amsmath, conflicts  
with
several LaTeX fonts. If you want finer control over which packages  
are

loaded, then it makes sense to define an export class like this in
.emacs:

But I just checked the results of exporting one of my org files,  
and it

does /not/ use amsmath.

Is this a bug in the tutorial?










Re: [O] bug in latex export tutorial?

2011-04-29 Thread Nick Dokos
Robert Goldman rpgold...@sift.info wrote:

 On 4/29/11 Apr 29 -11:44 AM, Thomas S. Dye wrote:
  Aloha Robert,
  
  Yep.  It should be One of these, amssymb, requires amsmath, which
  conflicts with several LaTeX fonts.
 
 I don't /believe/ amssymb requires amsmath.  I have been working on a
 document where I wanted to use some of the stuff in amsmath (e.g.,
 \text, align environment).  That document did /not/ parse, even though
 amssymb *is* in the preamble of the exported file.  I looked, and the
 preamble has amssymb, but not amsmath.
 
 It would be *great* if someone could provide tutorial information that
 would tell us:
 
 1.  How do we configure a file so that it *can* use amsmath?

amsmath conflicts with wasysym (redefines \iint), so you have to
redefine your headers to omit wasysym or include amsmath *first*: for
some reason, if you \usepackage{amsmath} *before* you
\usepackage{wasysym}, the error does not arise -- presumably, amsmath
assumes that \iint is not defined beforehand, whereas wasysym does not
make that assumption.

 2.  What happens to the parallel HTML export if we use amsmath
 constructs in an org file?
 

It would depend on whether you use the dvipng mechanism or the mathjax mechanism
for math visualization. In the first case, amsmath is automatically included by
org mode (before wasysym, so no problems). In the second case, I wouldn't be 
able
to tell you: I've had problems with mathjax that I've wanted to investigate for 
ages
and never had the time - one of these centuries I'll get around to it...

Nick



Re: [O] bug in latex export tutorial?

2011-04-29 Thread Robert Goldman
On 4/29/11 Apr 29 -1:21 PM, Nick Dokos wrote:
 Robert Goldman rpgold...@sift.info wrote:
 
 On 4/29/11 Apr 29 -11:44 AM, Thomas S. Dye wrote:
 Aloha Robert,

 Yep.  It should be One of these, amssymb, requires amsmath, which
 conflicts with several LaTeX fonts.

 I don't /believe/ amssymb requires amsmath.  I have been working on a
 document where I wanted to use some of the stuff in amsmath (e.g.,
 \text, align environment).  That document did /not/ parse, even though
 amssymb *is* in the preamble of the exported file.  I looked, and the
 preamble has amssymb, but not amsmath.

 It would be *great* if someone could provide tutorial information that
 would tell us:

 1.  How do we configure a file so that it *can* use amsmath?
 
 amsmath conflicts with wasysym (redefines \iint), so you have to
 redefine your headers to omit wasysym or include amsmath *first*: for
 some reason, if you \usepackage{amsmath} *before* you
 \usepackage{wasysym}, the error does not arise -- presumably, amsmath
 assumes that \iint is not defined beforehand, whereas wasysym does not
 make that assumption.

The not-very-tasty solution I came up with was to put the following into
the local variables list at the foot of my file:

# org-export-latex-default-packages-alist: ((AUTO inputenc t) (T1
fontenc t) ( fixltx2e nil) ( graphicx t) ( longtable nil)
( float nil) ( wrapfig nil) ( soul t) ( t1enc t) (
textcomp t) ( marvosym t) ( amsmath t) ( wasysym t) (
latexsym t) ( amssymb t)
(colorlinks=true,pdfstartview=FitV,linkcolor=blue,citecolor=blue,urlcolor=blue
hyperref nil) \\tolerance=1000)

I put this in the file, rather than in my configuration, because it is
specific to the formatting of this file, and because I share this
document with others, who need to be able to export from it w/o having
to reconfigure their org-mode installations.

I figure that someone can probably suggest a solution that is nicer than
that!

Best,
r




Re: [O] [BUG] in LaTeX export

2011-03-17 Thread Bastien
Hi Thomas,

Thomas Holst thomas.ho...@de.bosch.com writes:

   _abc /_abc/ *_abc* /a_bc/ *a_bc*

You need to escape the underscore:

  \_abc /\_abc/ *\_abc* /a\_bc/ *a\_bc*

HTH,

-- 
 Bastien



Re: [O] [BUG] in LaTeX export

2011-03-17 Thread Thomas Holst
Hi Bastien,

· Bastien b...@altern.org wrote:

 Hi Thomas,

 Thomas Holst thomas.ho...@de.bosch.com writes:

   _abc /_abc/ *_abc* /a_bc/ *a_bc*

 You need to escape the underscore:

   \_abc /\_abc/ *\_abc* /a\_bc/ *a\_bc*

 HTH,

thank you for your answer. Escaping does help. But I thought with setting

#+OPTIONS: ^:{}

there is no need to escape underscores.

#+begin_src org
  _abc and /a_bc/ 
#+end_src

is correctly exported:

#+begin_src latex
  \_{}abc \emph{a\_{}bc}
#+end_src

without escaping the underscore. Only strings wihch start with an
underscore and are emphsised are not exported correctly.

#+begin_src org
  /_abc/
#+end_src

gets exported to:

#+begin_src latex
  \emph{_abc}
#+end_src

Which confuses latex.

-- 
Best regards
  Thomas