[O] Bug in LaTeX export?

2019-06-13 Thread Thomas S. Dye

Aloha all,

I have this in my Org mode file:

#+name: tab:hanamiai-oxcal-files
#+attr_latex: :font \footnotesize :environment longtable :booktabs
#+caption: =OxCal= input files for the Hanamiai models

And this in the exported LaTeX file:

{\footnotesize
\begin{longtable}{lll}
\caption{\label{tab:orgf695a5d}
\texttt{OxCal} input files for the Hanamiai models}
\\

The linebreak at the end of the \caption line introduces a space 
before the caption in the list of tables.  I can get rid of the 
space like this:


{\footnotesize
\begin{longtable}{lll}
\caption{\label{tab:orgf695a5d}%
\texttt{OxCal} input files for the Hanamiai models}
\\

Note the % at the end of the \caption line.

A bug, or something in my setup?

All the best,
Tom
--
Thomas S. Dye
http://tsdye.online/tsdye



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:
> 




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

2017-06-30 Thread Robert Klein
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




[O] Bug in latex export figure labels?

2015-10-16 Thread garjola
Hi,

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?

Thank you.

Garjola




-- 
Dr. Dindi
Dad, Philosopher, Hacker



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



[O] Bug in LaTeX export with short captions

2015-09-10 Thread Suvayu Ali
Hi,

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.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



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



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

2014-09-14 Thread David Arroyo Menéndez

Hello,

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. 

Thanks in advance.



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.


[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
I just upgraded to org-mode 8.1 using 'package-install' and I think I am
encountering some bugs when
exporting to LaTeX. I am using the following tags
in the header of my orgmode files:

#+AUTHOR:[my name]
#+DATE:  %B %e, %Y

If I am exporting an entire buffer, %B %e, %Y now shows up verbatim
instead of as a date like it used to.

If I am exporting a subtree, I am also forced to re-specify the author and
date with :EXPORT_DATE: and :EXPORT_AUTHOR: or else the name is changed to
Charles Cave and the date something like 01-01-2009.


Emacs  : GNU Emacs 24.2.1 (i686-pc-linux-gnu, GTK+ Version 3.6.4)
 of 2013-04-09 on komainu, modified by Debian
Package: Org-mode version 8.1 (8.1-elpa @
/home/brian/.emacs.d/elpa/org-20130906/)

current state:
==
(setq
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
  org-babel-execute-safely-maybe)
 org-latex-format-headline-function
'org-latex-format-headline-default-function
 org-export-with-drawers '(not LOGBOOK)
 org-export-copy-to-kill-ring 'if-interactive
 org-archive-location ::*Archived Tasks
 org-export-date-timestamp-format nil
 org-export-with-tags t
 org-tab-first-hook '(org-hide-block-toggle-maybe
  org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-refile-targets '((org-agenda-files :maxlevel . 3))
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-hide-inline-tasks org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-export-email-info t
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-capture-templates '((t Task entry
  (file+headline ~/MasterFile.org Tasks)
  * TODO %? %i %a)
 (n General Note entry
  (file+headline ~/MasterFile.org Notes)
  * %? %i %a :kill-buffer t)
 )
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-log-refile 'time
 org-mode-hook '(#[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook org-show-block-all
append local]
   5]
 #[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook
org-babel-show-result-all append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-directory ~/Documents/
 org-export-creator-info nil
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-agenda-files '(~/Documents/area_paper2/area_paper2.org
~/MasterFile.org)
 org-file-apps '((auto-mode . emacs) (\\.mm\\' . default)
 (\\.x?html?\\' . default) (\\.pdf\\' . evince %s))
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-confirm-shell-link-function 'yes-or-no-p
 )


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



[O] bug in latex export?

2013-04-27 Thread renato
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}

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

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


which obviously brings to uncompilable latex code. BTW in the preamble
I have this that defines the environment theoremwithname:

#+LATEX_HEADER: 
\newtheoremstyle{withname}{}{}{\itshape}{}{\bfseries}{.}{.5em}{\thmname{#3} 
\thmnumber{#2}} 
#+LATEX_HEADER: \theoremstyle{withname}
#+LATEX_HEADER: \newtheorem{theoremwithname}[equation]{Teorema}


cheers,
renato


signature.asc
Description: PGP signature


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




[O] Bug(?) in LaTeX export?

2013-01-29 Thread Thorsten Jolitz

Hi List, 

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

,--
| \lstset{language=...}
| \begin{lstlisting}
| (def  ... )
| \end{lstlisting}
`--

but:

1. the package is not loaded in the preamble (there is no
\usepackage{listings}). 

2. the language name in {language=XXX} is simply copied from
   '#+begin_src XXX' and might not be defined in the listings package. 

Both points cause LaTeX errors. 

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





[O] Bug in latex export

2011-11-12 Thread Markus Grebenstein

Dear list,

I found a problem with the latex exporter when exporting bold font:

*this is a text* is exported as \textbf{this is a text\} with an extra \ 
which disables the }after it and causes a latex error.



I use org-mode 7.7 from githhub updated on tuesday or wednesday using 
org-tracks.


Please find the tex and the org file attached.

Best,

Markus

% Created 2011-11-12 Sa 12:09
\documentclass{book}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}\input{Templates/book_header.tex}
\input{Templates/grebi-settings-macros.tex}
\usepackage[style=authoryear-comp,backend=biber]{biblatex}
\bibliography{Diss-zotero}

\title{A title}
\author{The Author}
\date{12 November 2011}

\begin{document}

\maketitle

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





\part{Introduction :First Draft:}
\label{sec-1}

\chapter{Preface}
\label{sec-1.1}

\section{I. INTRODUCTION}
\label{sec-1.2}

Here is a text: 

\textbf{Here is some bold text\}
 

\end{document}
#+STARTUP: hidestars
#+STARTUP: indent
#+STARTUP: oddeven
#+TODO: TODO | DONE
#+TODO: Missing FirstDraft RevisedDraft | final
 (only to two levels in TOC)
#+OPTIONS: toc:4  *:t tags:nil H:6
##+OPTIONS: toc:nil(no TOC at all)
#+LaTeX_CMD: xelatex
#+LaTeX_CLASS: book
#+LaTeX_CLASS_OPTIONS: [a4paper,10pt]
#+LaTeX_HEADER: \input{Templates/book_header.tex}
#+LATEX_HEADER: \input{Templates/grebi-settings-macros.tex}
#+LATEX_HEADER: \usepackage[style=authoryear-comp,backend=biber]{biblatex}
#+LaTeX_HEADER: \bibliography{Diss-zotero}

#+DRAWERS: HIDDEN PROPERTIES NOTES SYNOPSIS
#+AUTHOR: The Author
## General Shortcuts


# End ACRONYM Shortcuts
#+TITLE: A title


* Introduction :First Draft: 
** Preface
*** I. INTRODUCTION :aTag:
Here is a text: 

*Here is some bold text*
 


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





[O] Bug Report: latex export interaction with inlinetasks

2011-10-08 Thread Colin Fraizer
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.)

 

NOTE: I'm exporting the subtrees with C-c C-e 1 d (or C-c C-e 1 L).

 

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

 



[O] Bug in LaTeX export for links with underscores in captions. (Easy to fix for elispers)

2011-10-02 Thread Magnus Nilsson
This is a bug which elisp-driven orgers with access to the git
repository can fix quickly.

* Linking to [[a_file.txt][a file with underscore]] in a headline works well
with LaTeX export

#+CAPTION: Linking [[a_file.txt][a file with underscore]] in a caption does
_not_ work well with LaTeX export.
[[/Path_to_figure/figure.png]]

The reason is because org-export-latex-links processes the figure's
caption with org-export-latex-fontify-headline, which in turn
processes the caption's link (with altered underscores for some
reason). For example,
(org-export-latex-fontify-headline [[/Path_to_figure/figure.png][a file
with underscore]])
returns
#(\\href{file://./Path\\_{}to\\_{}figure/figure.png}{a file with
underscore} 14 15 (org-attr nil) 15 24 (org-protected t org-attr nil) 24 25
(org-protected t org-attr nil) 25 28 (org-protected t org-attr nil) 28 35
(org-protected t org-attr nil) 35 46 (org-attr nil))

There must be a way to process links (whose path contains underscores)
within captions to floats correctly.

Best regards,
Magnus


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

2011-09-26 Thread Robert Goldman
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
* Heading
* Another heading
* Some text
Inside the text there is a footnote.[1]

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



footnote-crossref.tex
Description: TeX document


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


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

2011-08-27 Thread Oliver Gerlach
Dealing with current org installations I found out that latex export is 
in general not working (command =C-C C-E l=)


The generated tex file stops at the beginning, here an example:


 Created 2011-08-26 Fri 14:40
\documentclass[11pt,a4paper]{article}
\usepackage[AUTO]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}
\tolerance=1000
\providecommand{\alert}[1]{\textbf{#1}}

\title{Title}
\author{Oliver Gerlach}
\date{\today}

\begin{document}

\maketitle

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



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?


Regards

Oliver Gerlach


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.




Emacs  : GNU Emacs 23.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.35)
 of 2011-03-10 on black.porkrind.org
Package: Org-mode version 7.7

current state:
==
(setq
 org-property-format %-18s %s
 org-export-with-LaTeX-fragments 'mathjax
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-agenda-files 
'(~/Documents/Oliver/Kongresse/Thessaloniki/essay/bari.org)

 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-startup-truncated nil
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-startup-folded nil
 org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-support-shift-select 'always
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)

 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-blank-before-new-entry nil
 org-babel-pre-tangle-hook '(save-buffer)
 org-cycle-hook '(org-cycle-hide-archived-subtrees 
org-cycle-hide-drawers org-cycle-show-empty-lines

  org-optimize-window-after-visibility-change)
 org-export-latex-classes '((article 
\\documentclass[11pt,a4paper]{article})

(report
			 
\\documentclass[11pt,a4paper]{report}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\\usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig}\n\\usepackage{soul}\n\\usepackage{amssymb}\n\\usepackage{hyperref}

 (\\part{%s} . \\part*{%s}) (\\chapter{%s} . 
\\chapter*{%s})
			 (\\section{%s} . \\section*{%s}) (\\subsection{%s} . 
\\subsection*{%s})

 (\\subsubsection{%s} . \\subsubsection*{%s}))
(book
			 
\\documentclass[11pt,a4paper,twoside]{article}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\\usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig}\n\\usepackage{soul}\n\\usepackage{amssymb}\n\\usepackage{hyperref}\n\\usepackage[round]{natbib}

 (\\part{%s} . \\part*{%s}) (\\chapter{%s} . 
\\chapter*{%s})
			 (\\section{%s} . \\section*{%s}) (\\subsection{%s} . 
\\subsection*{%s})

 (\\subsubsection{%s} . \\subsubsection*{%s}))
)
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-mode-hook '(#[nil \300\301\302\303\304$\207 [org-add-hook 
change-major-mode-hook org-show-block-all append local] 5]

 #[nil \300\301\302\303\304$\207
		   [org-add-hook change-major-mode-hook org-babel-show-result-all 
append local] 5]

 org-babel-result-hide-spec org-babel-hide-all-hashes 
turn-on-org-cdlatex)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)

 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src 
org-babel-exp-inline-src-blocks))

 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-occur-hook '(org-first-headline-recenter)
 org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
 org-export-latex-final-hook '(org-beamer-amend-header 
org-beamer-fix-toc 

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



[O] Bug in latex export tutorial on worg ?

2011-05-09 Thread Robert Goldman
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?

Cheers,
r



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)



[O] bug in latex export tutorial?

2011-04-29 Thread Robert Goldman
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,

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




[O] Bug in latex export of links

2011-04-29 Thread Robert Goldman
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.

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



[O] [BUG] in LaTeX export

2011-03-15 Thread Thomas Holst
Hello,

while exporting an org-file to LaTeX I stumbled across a minor bug with
emphasis and underscores.

Minimal org-file:
#+begin_src org
#+OPTIONS: ^:{}
* Emphasis Test

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

#+end_src

leads to the following LaTeX code:

#+begin_src

  \_{}abc \emph{_abc} \textbf{_abc} \emph{a\_{}bc} \textbf{a\_{}bc}

#+end_src

So emphasised text strings starting with an underscore are not exported
correctly and confuse LaTeX.

emacs 23.2 on WinXP, org-mode version 7.5 (release_7.5.34.g54c51)
(localy patched Makefile and org-git-link.el)

Best regards
  Thomas

P.S. org-mode is a superb piece of software and really makes my life
a lot easier. Thanks to all of you!