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



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

2013-04-28 Thread Nicolas Goaziou
Hello,

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



[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-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
Hi Thorsten,

Thorsten Jolitz  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?

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
Aloha Thorsten,

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



[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

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? in latex export of cross-references in footnotes

2011-10-09 Thread Nicolas Goaziou
Hello,

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



[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


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? 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 tutorial on worg ?

2011-05-10 Thread Thomas S. Dye
Robert Goldman  writes:

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

> On 5/9/11 May 9 -9:54 PM, Nick Dokos wrote:
>> Robert Goldman  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-10 Thread Robert Goldman
On 5/10/11 May 10 -12:25 AM, Thomas S. Dye wrote:
> Robert Goldman  writes:
> 
>> On 5/9/11 May 9 -11:22 PM, Nick Dokos wrote:
>>> Robert Goldman  wrote:
>>>
 On 5/9/11 May 9 -9:54 PM, Nick Dokos wrote:
> Robert Goldman  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
Nick Dokos  writes:

> Nick Dokos  wrote:
>
>> Robert Goldman  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
>
>
Hi Nick,

Actually, your diagnosis was exactly right, as usual.  The "buggy" example
came from a document meant as a tutorial.

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

> Robert Goldman  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 tutorial on worg ?

2011-05-09 Thread Thomas S. Dye
Robert Goldman  writes:

> On 5/9/11 May 9 -11:22 PM, Nick Dokos wrote:
>> Robert Goldman  wrote:
>> 
>>> On 5/9/11 May 9 -9:54 PM, Nick Dokos wrote:
 Robert Goldman  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
Robert Goldman  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 Robert Goldman
On 5/9/11 May 9 -11:22 PM, Nick Dokos wrote:
> Robert Goldman  wrote:
> 
>> On 5/9/11 May 9 -9:54 PM, Nick Dokos wrote:
>>> Robert Goldman  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  wrote:

> On 5/9/11 May 9 -9:54 PM, Nick Dokos wrote:
> > Robert Goldman  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



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

2011-05-09 Thread Thomas S. Dye
Robert Goldman  writes:

> On 5/9/11 May 9 -9:54 PM, Nick Dokos wrote:
>> Robert Goldman  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.
>
> best,
> r

Aloha Robert,

You can set both :results silent and :exports none.  The :results header
argument sets how the results of evaluation appear (or not) in the
Org-mode buffer, and the :exports argument determines what the exporter
does with the source code block.

hth,
Tom

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



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

2011-05-09 Thread Robert Goldman
On 5/9/11 May 9 -9:54 PM, Nick Dokos wrote:
> Robert Goldman  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.

best,
r




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

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



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

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 <>
> 
> 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 "<<>>?\\((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  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 
;; 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 of <>

2011-04-29 Thread Robert Goldman
I have this header in my org-mode file:

 Documentation <>

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

2011-04-29 Thread Robert Goldman
On 4/29/11 Apr 29 -1:21 PM, Nick Dokos wrote:
> 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?
> 
> 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 tutorial?

2011-04-29 Thread Nick Dokos
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?

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

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?







[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

2011-03-17 Thread Thomas Holst
Hi Bastien,

ยท Bastien  wrote:

> Hi Thomas,
>
> Thomas Holst  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



Re: [O] [BUG] in LaTeX export

2011-03-17 Thread Bastien
Hi Thomas,

Thomas Holst  writes:

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

You need to escape the underscore:

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

HTH,

-- 
 Bastien



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