Re: [Orgmode] Re: LaTeX export of lists

2010-11-28 Thread Thomas S. Dye

Aloha Richard,
On Nov 27, 2010, at 8:40 PM, Richard Lawrence wrote:


Hi Tom,

Is there an easy way to keep text following a list with the list,  
i.e,

without a blank line following the list, during export?

* List
 1. First item
 2. Second item
Following text.

Gets exported as:

\section{List}
\label{sec-1}

\begin{enumerate}
\item First item
\item Second item
\end{enumerate}

Following text.

I don't want a blank line between \end{enumerate} and Following  
text.


Is this because you don't want to start a new paragraph in LaTeX?  I
have used \noindent on the occasions when I have run into this issue.

* List
 1. First item
 2. Second item
\noindent
Following text

Not necessarily pretty, but it works, if you're just looking to  
prevent

indentation.

Best,
Richard


Thanks for this suggestion.

I'm typesetting the list inside a paragraph.  The example I gave  
should look something like this when typeset:


(i) First item (ii) Second item Following text

\noindent doesn't put Following text on the same line as Second  
item.  With \noindent I get this:


(i) First item (ii) Second item
Following text

The blank line following the exported list is really a problem in this  
context.  I'm hoping there is an easy way to suppress it, or at least  
some way to do so, even if it isn't easy.


All the best,
Tom

All the best,
Tom ___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX export of lists

2010-11-27 Thread Richard Lawrence
Hi Tom,

 Is there an easy way to keep text following a list with the list, i.e,
 without a blank line following the list, during export?

 * List
   1. First item
   2. Second item
 Following text.

 Gets exported as:

 \section{List}
 \label{sec-1}

 \begin{enumerate}
 \item First item
 \item Second item
 \end{enumerate}

 Following text.

 I don't want a blank line between \end{enumerate} and Following text.

Is this because you don't want to start a new paragraph in LaTeX?  I
have used \noindent on the occasions when I have run into this issue.

* List
  1. First item
  2. Second item
\noindent
Following text

Not necessarily pretty, but it works, if you're just looking to prevent
indentation.  

Best,
Richard


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: latex export problem

2010-10-01 Thread Noorul Islam K M
Jörg Hagmann joerg.hagm...@unibas.ch writes:

  Dear list,

 I have an org file named test.org structured as follows (minimal example):

 --minimal example
 * Head
   text

 * Second head
   :PROPERTIES:
   :EXPORT_OPTIONS: H:5 num:nil toc:t \n:nil @:t ::t |:t ^:{} -:t f:t
 *:t skip:nil d:nil tags:nil
   :EXPORT_TITLE: My Title
   :EXPORT_FILE_NAME: scripts/filename
   :END:


 #+begin_src latex
 \input gentium-ge
 #+end_src

 ** section
text
 --end of minimal example---

 I export the second head to a filename.tex file in a subdirectory (and
 convert it later to ConTeXt code, but that shouldn't matter here). I
 swear that this worked -- I have everything pertaining to my lectures
 in this file.
 However, it stopped working recently (without updating org-mode). All
 I get when I export Second Head to latex is:
 No such file: /Users/me/test.org
 The cause is the #+begin_src ... #+end_src block


Can you please tell us which version of emacs and org-mode are you
using? 

M-x org-version
M-x emacs-version

Thanks and Regards
Noorul

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: latex export problem

2010-10-01 Thread Jörg Hagmann

 org-version: yesterday's pull
emacs: 23.2.1 (x86_64-apple-darwin, NS apple-appkit-1038.29)
 of 2010-05-09

On 10/1/10 9:32 AM, Noorul Islam K M wrote:

Jörg Hagmannjoerg.hagm...@unibas.ch  writes:


  Dear list,

I have an org file named test.org structured as follows (minimal example):

--minimal example
* Head
   text

* Second head
   :PROPERTIES:
   :EXPORT_OPTIONS: H:5 num:nil toc:t \n:nil @:t ::t |:t ^:{} -:t f:t
*:t skip:nil d:nil tags:nil
   :EXPORT_TITLE: My Title
   :EXPORT_FILE_NAME: scripts/filename
   :END:


#+begin_src latex
\input gentium-ge
#+end_src

** section
text
--end of minimal example---

I export the second head to a filename.tex file in a subdirectory (and
convert it later to ConTeXt code, but that shouldn't matter here). I
swear that this worked -- I have everything pertaining to my lectures
in this file.
However, it stopped working recently (without updating org-mode). All
I get when I export Second Head to latex is:
No such file: /Users/me/test.org
The cause is the #+begin_src ... #+end_src block


Can you please tell us which version of emacs and org-mode are you
using?

M-x org-version
M-x emacs-version

Thanks and Regards
Noorul


--
Prof. Jörg Hagmann-Zanolari MD
University of Basel
Department of Biomedicine
Institute of Biochemistry and Genetics
Mattenstrasse 28
CH-4058 Basel
Switzerland
Phone +41 (0)61 267 3565


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: latex export problem

2010-10-01 Thread Christian Moe

On 10/1/10 9:40 AM, Jörg Hagmann wrote:

org-version: yesterday's pull
emacs: 23.2.1 (x86_64-apple-darwin, NS apple-appkit-1038.29)
of 2010-05-09


And mine is

- this morning's pull

- GNU Emacs 23.2.1 (powerpc-apple-darwin9.8.0, NS apple-appkit-949.54) 
of 2010-09-03


CM


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: latex export problem

2010-10-01 Thread Noorul Islam K M
Jörg Hagmann joerg.hagm...@unibas.ch writes:

  org-version: yesterday's pull
 emacs: 23.2.1 (x86_64-apple-darwin, NS apple-appkit-1038.29)
  of 2010-05-09


I copied your example to a file /tmp/test.org and with the cursor on
Second head I did C-c C-e 1 l. It did generate output file
/tmp/scripts/filename.tex and I did not get any error.

Is it related to Mac? I am not sure though

I have on my machine:

Org-mode version 7.01trans (release_7.01h.609.gc4916)
GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.12.12)
 of 2010-09-29 on noorul

Thanks and Regards
Noorul


 On 10/1/10 9:32 AM, Noorul Islam K M wrote:
 Jörg Hagmannjoerg.hagm...@unibas.ch  writes:

   Dear list,

 I have an org file named test.org structured as follows (minimal example):

 --minimal example
 * Head
text

 * Second head
:PROPERTIES:
:EXPORT_OPTIONS: H:5 num:nil toc:t \n:nil @:t ::t |:t ^:{} -:t f:t
 *:t skip:nil d:nil tags:nil
:EXPORT_TITLE: My Title
:EXPORT_FILE_NAME: scripts/filename
:END:


 #+begin_src latex
 \input gentium-ge
 #+end_src

 ** section
 text
 --end of minimal example---

 I export the second head to a filename.tex file in a subdirectory (and
 convert it later to ConTeXt code, but that shouldn't matter here). I
 swear that this worked -- I have everything pertaining to my lectures
 in this file.
 However, it stopped working recently (without updating org-mode). All
 I get when I export Second Head to latex is:
 No such file: /Users/me/test.org
 The cause is the #+begin_src ... #+end_src block

 Can you please tell us which version of emacs and org-mode are you
 using?

 M-x org-version
 M-x emacs-version

 Thanks and Regards
 Noorul

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: latex export problem

2010-10-01 Thread Noorul Islam
On Fri, Oct 1, 2010 at 2:33 PM, Noorul Islam K M noo...@noorul.com wrote:
 Jörg Hagmann joerg.hagm...@unibas.ch writes:

  org-version: yesterday's pull
 emacs: 23.2.1 (x86_64-apple-darwin, NS apple-appkit-1038.29)
  of 2010-05-09


 I copied your example to a file /tmp/test.org and with the cursor on
 Second head I did C-c C-e 1 l. It did generate output file
 /tmp/scripts/filename.tex and I did not get any error.

 Is it related to Mac? I am not sure though

 I have on my machine:

 Org-mode version 7.01trans (release_7.01h.609.gc4916)
 GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.12.12)
  of 2010-09-29 on noorul

 Thanks and Regards
 Noorul



On emacs

GNU Emacs 23.1.1 (i686-pc-linux-gnu, GTK+ Version 2.12.12) of
2010-01-30 on noorul


I get the following error

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  get-file-buffer(nil)
  org-babel-exp-src-blocks(#(\\input gentium-ge 0 17 (fontified nil
font-lock-fontified t)) #(latex 0 5 (font-lock-fontified t fontified
nil)))
  apply(org-babel-exp-src-blocks #(\\input gentium-ge 0 17
(fontified nil font-lock-fontified t)) #(latex 0 5
(font-lock-fontified t fontified nil)))
  byte-code(ÆÇ%'(ÈÉ!)#

Thanks and Regards
Noorul

 On 10/1/10 9:32 AM, Noorul Islam K M wrote:
 Jörg Hagmannjoerg.hagm...@unibas.ch  writes:

   Dear list,

 I have an org file named test.org structured as follows (minimal 
 example):

 --minimal example
 * Head
    text

 * Second head
    :PROPERTIES:
    :EXPORT_OPTIONS: H:5 num:nil toc:t \n:nil @:t ::t |:t ^:{} -:t f:t
 *:t skip:nil d:nil tags:nil
    :EXPORT_TITLE: My Title
    :EXPORT_FILE_NAME: scripts/filename
    :END:


 #+begin_src latex
 \input gentium-ge
 #+end_src

 ** section
     text
 --end of minimal example---

 I export the second head to a filename.tex file in a subdirectory (and
 convert it later to ConTeXt code, but that shouldn't matter here). I
 swear that this worked -- I have everything pertaining to my lectures
 in this file.
 However, it stopped working recently (without updating org-mode). All
 I get when I export Second Head to latex is:
 No such file: /Users/me/test.org
 The cause is the #+begin_src ... #+end_src block

 Can you please tell us which version of emacs and org-mode are you
 using?

 M-x org-version
 M-x emacs-version

 Thanks and Regards
 Noorul


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: latex export problem

2010-10-01 Thread Jörg Hagmann



On 10/1/10 11:17 AM, Noorul Islam wrote:

I have on my machine:

Org-mode version 7.01trans (release_7.01h.609.gc4916)
GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.12.12)
  of 2010-09-29 on noorul

Thanks and Regards
Noorul

On emacs

GNU Emacs 23.1.1 (i686-pc-linux-gnu, GTK+ Version 2.12.12) of
2010-01-30 on noorul


I get the following error

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
   get-file-buffer(nil)
   org-babel-exp-src-blocks(#(\\input gentium-ge 0 17 (fontified nil
font-lock-fontified t)) #(latex 0 5 (font-lock-fontified t fontified
nil)))
   apply(org-babel-exp-src-blocks #(\\input gentium-ge 0 17
(fontified nil font-lock-fontified t)) #(latex 0 5
(font-lock-fontified t fontified nil)))
   byte-code(ÆÇ%'(ÈÉ!)#

Thanks and Regards
Noorul

I now tried it on linux (23.1.1 i486 pc-linux-gnu, GTK+ version 2.20.0) ...
... and there it works!

Kind regards, Jörg

Jörg Hagmannjoerg.hagm...@unibas.chwrites:


   Dear list,

I have an org file named test.org structured as follows (minimal example):

--minimal example
* Head
text

* Second head
:PROPERTIES:
:EXPORT_OPTIONS: H:5 num:nil toc:t \n:nil @:t ::t |:t ^:{} -:t f:t
*:t skip:nil d:nil tags:nil
:EXPORT_TITLE: My Title
:EXPORT_FILE_NAME: scripts/filename
:END:


#+begin_src latex
\input gentium-ge
#+end_src

** section
 text
--end of minimal example---

I export the second head to a filename.tex file in a subdirectory (and
convert it later to ConTeXt code, but that shouldn't matter here). I
swear that this worked -- I have everything pertaining to my lectures
in this file.
However, it stopped working recently (without updating org-mode). All
I get when I export Second Head to latex is:
No such file: /Users/me/test.org
The cause is the #+begin_src ... #+end_src block



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: latex export problem

2010-10-01 Thread Jörg Hagmann

 And an update:

It also doesn't work on my Mac with Emacs 24 (GNU Emacs 24.0.50.1 
(x86_64-apple-darwin, NS apple-appkit-1038.32) of 2010-10-01 on 
black.porkrind.org


Summary:

Works on
- GNU Emacs 24.0.50.1 (i686-pc-linux-gnu) (Noorul)
- GNU Emacs 23.1.1 (i486 pc-linux-gnu) (Jörg)

Error on:
- GNU Emacs 23.1.1 (i686-pc-linux-gnu) (Noorul)
- GNU Emacs 23.2.1 (powerpc-apple-darwin9.8.0) (Christian)
- GNU Emacs 23.2.1 (x86_64-apple-darwin) (Jörg)
- GNU Emacs 24.0.50.1 (x86_64-apple-darwin) (Jörg)

But, to repeat myself, it might not depend on the Emacs version. In my 
case, it used to work with GNU Emacs 23.2.1 (x86_64-apple-darwin)...


Thanks and regards, Jörg

On 10/1/10 1:38 PM, Jörg Hagmann wrote:



On 10/1/10 11:17 AM, Noorul Islam wrote:

I have on my machine:

Org-mode version 7.01trans (release_7.01h.609.gc4916)
GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.12.12)
  of 2010-09-29 on noorul

Thanks and Regards
Noorul

On emacs

GNU Emacs 23.1.1 (i686-pc-linux-gnu, GTK+ Version 2.12.12) of
2010-01-30 on noorul


I get the following error

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
   get-file-buffer(nil)
   org-babel-exp-src-blocks(#(\\input gentium-ge 0 17 (fontified nil
font-lock-fontified t)) #(latex 0 5 (font-lock-fontified t fontified
nil)))
   apply(org-babel-exp-src-blocks #(\\input gentium-ge 0 17
(fontified nil font-lock-fontified t)) #(latex 0 5
(font-lock-fontified t fontified nil)))
   byte-code(ÆÇ%'(ÈÉ!)#

Thanks and Regards
Noorul
I now tried it on linux (23.1.1 i486 pc-linux-gnu, GTK+ version 
2.20.0) ...

... and there it works!

Kind regards, Jörg

Jörg Hagmannjoerg.hagm...@unibas.chwrites:


   Dear list,

I have an org file named test.org structured as follows 
(minimal example):


--minimal example
* Head
text

* Second head
:PROPERTIES:
:EXPORT_OPTIONS: H:5 num:nil toc:t \n:nil @:t ::t |:t ^:{} 
-:t f:t

*:t skip:nil d:nil tags:nil
:EXPORT_TITLE: My Title
:EXPORT_FILE_NAME: scripts/filename
:END:


#+begin_src latex
\input gentium-ge
#+end_src

** section
 text
--end of minimal example---

I export the second head to a filename.tex file in a subdirectory 
(and

convert it later to ConTeXt code, but that shouldn't matter here). I
swear that this worked -- I have everything pertaining to my 
lectures

in this file.
However, it stopped working recently (without updating org-mode). 
All

I get when I export Second Head to latex is:
No such file: /Users/me/test.org
The cause is the #+begin_src ... #+end_src block


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: latex export and booktabs tables

2010-06-30 Thread Eric Schulte
This booktabs function has now been added to the library of babel.

Cheers -- Eric

Eric Schulte schulte.e...@gmail.com writes:

 Hi Tom,

 How about the following proposed library of babel function which
 constructs a booktabs environment using a toprule, (conditionally) a
 midrule, and a bottomrule.

 *** booktabs
 This block can be used to wrap a table in the latex =booktabs=
 environment, it takes the following arguments -- all but the first two
 are optional.
 | arg   | description|
 |---+|
 | table | a reference to the table   |
 | align | optional alignment string  |
 | env   | optional environment, default to tabular |
 | width | optional width specification string|

 #+srcname: booktabs
 #+begin_src emacs-lisp :var table='((:head) hline (:body)) :var align='() 
 :var env=tabular :var width='() :noweb yes :results latex
   (flet ((to-tab (tab)
  (orgtbl-to-generic
   (mapcar (lambda (lis)
 (if (listp lis)
 (mapcar (lambda (el)
   (if (stringp el)
   el
 (format %S el))) lis)
   lis)) tab)
   (list :lend   :sep:hline \\hline
 (org-fill-template
  
   \\begin{%env}%width%align
   \\toprule
   %table
   \\bottomrule
   \\end{%env}\n
  (list
   (cons env   (or env table))
   (cons width (if width (format {%s} width) ))
   (cons align (if align (format {%s} align) ))
   (cons table
 ;; only use \midrule if it looks like there are column headers
 (if (equal 'hline (second table))
 (concat (to-tab (list (first table)))
 \n\\midrule\n
 (to-tab (cddr table)))
   (to-tab table))
 #+end_src

 once loaded it can be applied as here

 ** booktabs
 #+tblname: months
 | num | Abbrev. |
 |-+-|
 |   1 | Jan.|
 |   2 | Feb.|
 |   3 | Mar.|

 #+call: booktabs(table=months, align=r|l) :results latex :exports results

 Also, note that the longtable function currently in the library-of-babel
 does allow for replacing the global default hline value.

 I'm sure the above isn't perfect, however hopefully it is close enough
 that you could recommend how to get the rest of the way there.

 Thanks -- Eric

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

 Hi Eric,

 This is neat, but it doesn't directly address the problem posed by the
 OP.

 Currently, the LaTeX exporter uses \hline for all the horizontal rules
 in a table.  Booktabs defines three rules of different thickness for
 use at the top of the table, after the column heads, and at the bottom
 of the table.  So, one would want a function that let each of the
 rules take a different value.  The default for each could be hline,
 giving the current behavior of the exporter.  Francesco Pizzolante set
 this out nicely a while back:
 http://www.mail-archive.com/emacs-orgmode@gnu.org/msg18311.html in a
 message that Seb Vauban brought up in a slightly different  context.

 All the best,
 Tom

 On Jun 27, 2010, at 7:09 PM, Eric Schulte wrote:

 One way to deal with this without adding even more complexity to the
 core of org-mode could be through the use of Library of Babel
 functions.

 The attached org-mode file provides a function for exporting to the
 longtable environment with some example usage.  If this looks
 generally
 useful it (and maybe similar functions) could be added to the
 library of
 babel distributed w/Org-mode.

 What do you think? -- Eric

 longtable.org
 Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 Hi Erik,

 Erik Butz wrote:
 I found a very old thread on the list about using the booktabs
 package to
 have nicer tables in latex export.

 I found that, making the changes below I can use the booktab
 package to
 export tables, and using standard tables only, this seems to work
 fine.

 Can anyone advice on whether this kind of change is meaningful or
 if this is
 likely to introduce difficulties elsewhere which I did not
 experience due to
 the limited scope of usage? It should be said that I did not at
 all look
 into longtables so far.

 While trying to improve this, I think one could extend it so that
 the table
 environment can be changed as well, from `tabular' to `array',
 tabular*',
 `tabularx' or any other.

 There was a discussion on this, a while ago, by Francesco
 Pizzolante. Have a
 read at:
 http://www.mail-archive.com/emacs-orgmode@gnu.org/msg18311.html
 .

 Best regards,
  Seb
 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: latex export and booktabs tables

2010-06-29 Thread Thomas S. Dye

Hi Eric,

This is neat, but it doesn't directly address the problem posed by the  
OP.


Currently, the LaTeX exporter uses \hline for all the horizontal rules  
in a table.  Booktabs defines three rules of different thickness for  
use at the top of the table, after the column heads, and at the bottom  
of the table.  So, one would want a function that let each of the  
rules take a different value.  The default for each could be hline,  
giving the current behavior of the exporter.  Francesco Pizzolante set  
this out nicely a while back: http://www.mail-archive.com/emacs-orgmode@gnu.org/msg18311.html 
 in a message that Seb Vauban brought up in a slightly different  
context.


All the best,
Tom

On Jun 27, 2010, at 7:09 PM, Eric Schulte wrote:


One way to deal with this without adding even more complexity to the
core of org-mode could be through the use of Library of Babel
functions.

The attached org-mode file provides a function for exporting to the
longtable environment with some example usage.  If this looks  
generally
useful it (and maybe similar functions) could be added to the  
library of

babel distributed w/Org-mode.

What do you think? -- Eric

longtable.org
Sébastien Vauban wxhgmqzgw...@spammotel.com writes:


Hi Erik,

Erik Butz wrote:
I found a very old thread on the list about using the booktabs  
package to

have nicer tables in latex export.

I found that, making the changes below I can use the booktab  
package to
export tables, and using standard tables only, this seems to work  
fine.


Can anyone advice on whether this kind of change is meaningful or  
if this is
likely to introduce difficulties elsewhere which I did not  
experience due to
the limited scope of usage? It should be said that I did not at  
all look

into longtables so far.


While trying to improve this, I think one could extend it so that  
the table
environment can be changed as well, from `tabular' to `array',  
`tabular*',

`tabularx' or any other.

There was a discussion on this, a while ago, by Francesco  
Pizzolante. Have a
read at: http://www.mail-archive.com/emacs-orgmode@gnu.org/msg18311.html 
.


Best regards,
 Seb

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: latex export and booktabs tables

2010-06-29 Thread Eric Schulte
Hi Tom,

How about the following proposed library of babel function which
constructs a booktabs environment using a toprule, (conditionally) a
midrule, and a bottomrule.

--8---cut here---start-8---
*** booktabs
This block can be used to wrap a table in the latex =booktabs=
environment, it takes the following arguments -- all but the first two
are optional.
| arg   | description|
|---+|
| table | a reference to the table   |
| align | optional alignment string  |
| env   | optional environment, default to tabular |
| width | optional width specification string|

#+srcname: booktabs
#+begin_src emacs-lisp :var table='((:head) hline (:body)) :var align='() :var 
env=tabular :var width='() :noweb yes :results latex
  (flet ((to-tab (tab)
 (orgtbl-to-generic
  (mapcar (lambda (lis)
(if (listp lis)
(mapcar (lambda (el)
  (if (stringp el)
  el
(format %S el))) lis)
  lis)) tab)
  (list :lend   :sep:hline \\hline
(org-fill-template
 
  \\begin{%env}%width%align
  \\toprule
  %table
  \\bottomrule
  \\end{%env}\n
 (list
  (cons env   (or env table))
  (cons width (if width (format {%s} width) ))
  (cons align (if align (format {%s} align) ))
  (cons table
;; only use \midrule if it looks like there are column headers
(if (equal 'hline (second table))
(concat (to-tab (list (first table)))
\n\\midrule\n
(to-tab (cddr table)))
  (to-tab table))
#+end_src
--8---cut here---end---8---

once loaded it can be applied as here

--8---cut here---start-8---
** booktabs
#+tblname: months
| num | Abbrev. |
|-+-|
|   1 | Jan.|
|   2 | Feb.|
|   3 | Mar.|

#+call: booktabs(table=months, align=r|l) :results latex :exports results
--8---cut here---end---8---

Also, note that the longtable function currently in the library-of-babel
does allow for replacing the global default hline value.

I'm sure the above isn't perfect, however hopefully it is close enough
that you could recommend how to get the rest of the way there.

Thanks -- Eric

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

 Hi Eric,

 This is neat, but it doesn't directly address the problem posed by the
 OP.

 Currently, the LaTeX exporter uses \hline for all the horizontal rules
 in a table.  Booktabs defines three rules of different thickness for
 use at the top of the table, after the column heads, and at the bottom
 of the table.  So, one would want a function that let each of the
 rules take a different value.  The default for each could be hline,
 giving the current behavior of the exporter.  Francesco Pizzolante set
 this out nicely a while back:
 http://www.mail-archive.com/emacs-orgmode@gnu.org/msg18311.html in a
 message that Seb Vauban brought up in a slightly different  context.

 All the best,
 Tom

 On Jun 27, 2010, at 7:09 PM, Eric Schulte wrote:

 One way to deal with this without adding even more complexity to the
 core of org-mode could be through the use of Library of Babel
 functions.

 The attached org-mode file provides a function for exporting to the
 longtable environment with some example usage.  If this looks
 generally
 useful it (and maybe similar functions) could be added to the
 library of
 babel distributed w/Org-mode.

 What do you think? -- Eric

 longtable.org
 Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 Hi Erik,

 Erik Butz wrote:
 I found a very old thread on the list about using the booktabs
 package to
 have nicer tables in latex export.

 I found that, making the changes below I can use the booktab
 package to
 export tables, and using standard tables only, this seems to work
 fine.

 Can anyone advice on whether this kind of change is meaningful or
 if this is
 likely to introduce difficulties elsewhere which I did not
 experience due to
 the limited scope of usage? It should be said that I did not at
 all look
 into longtables so far.

 While trying to improve this, I think one could extend it so that
 the table
 environment can be changed as well, from `tabular' to `array',
 tabular*',
 `tabularx' or any other.

 There was a discussion on this, a while ago, by Francesco
 Pizzolante. Have a
 read at:
 http://www.mail-archive.com/emacs-orgmode@gnu.org/msg18311.html
 .

 Best regards,
  Seb
 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 

Re: [Orgmode] Re: latex export and booktabs tables

2010-06-28 Thread Carsten Dominik


On Jun 28, 2010, at 7:09 AM, Eric Schulte wrote:


One way to deal with this without adding even more complexity to the
core of org-mode could be through the use of Library of Babel
functions.

The attached org-mode file provides a function for exporting to the
longtable environment with some example usage.  If this looks  
generally
useful it (and maybe similar functions) could be added to the  
library of

babel distributed w/Org-mode.

What do you think? -- Eric


This looks like a great solution to me.

- Carsten



longtable.org
Sébastien Vauban wxhgmqzgw...@spammotel.com writes:


Hi Erik,

Erik Butz wrote:
I found a very old thread on the list about using the booktabs  
package to

have nicer tables in latex export.

I found that, making the changes below I can use the booktab  
package to
export tables, and using standard tables only, this seems to work  
fine.


Can anyone advice on whether this kind of change is meaningful or  
if this is
likely to introduce difficulties elsewhere which I did not  
experience due to
the limited scope of usage? It should be said that I did not at  
all look

into longtables so far.


While trying to improve this, I think one could extend it so that  
the table
environment can be changed as well, from `tabular' to `array',  
`tabular*',

`tabularx' or any other.

There was a discussion on this, a while ago, by Francesco  
Pizzolante. Have a
read at: http://www.mail-archive.com/emacs-orgmode@gnu.org/msg18311.html 
.


Best regards,
 Seb

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


- Carsten




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: latex export and booktabs tables

2010-06-28 Thread Sébastien Vauban
Hi Eric,

Carsten Dominik wrote:
 On Jun 28, 2010, at 7:09 AM, Eric Schulte wrote:

 One way to deal with this without adding even more complexity to the core
 of org-mode could be through the use of Library of Babel functions.

 The attached org-mode file provides a function for exporting to the
 longtable environment with some example usage. If this looks generally
 useful it (and maybe similar functions) could be added to the library of
 babel distributed w/Org-mode.

 What do you think? -- Eric

 This looks like a great solution to me.

It does look great to me as well. Just a request on the wish-list: could the
table environment be made a parameter (so that we can choose between tabular,
tabular*, etc.)?

Best regards,
  Seb

-- 
Sébastien Vauban


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: latex export and booktabs tables

2010-06-28 Thread Eric Schulte
Hi Sébastien,

Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 Hi Eric,

 Carsten Dominik wrote:
 On Jun 28, 2010, at 7:09 AM, Eric Schulte wrote:

 One way to deal with this without adding even more complexity to the core
 of org-mode could be through the use of Library of Babel functions.

 The attached org-mode file provides a function for exporting to the
 longtable environment with some example usage. If this looks generally
 useful it (and maybe similar functions) could be added to the library of
 babel distributed w/Org-mode.

 What do you think? -- Eric

 This looks like a great solution to me.

 It does look great to me as well. Just a request on the wish-list: could the
 table environment be made a parameter (so that we can choose between tabular,
 tabular*, etc.)?


Sure, my thinking was that it may be more natural to use the environment
type as the function name (allowing more concise function calls).  Also,
that way if there are some arguments that only make sense for particular
environment (I'm not sure that there are) then it would be easy to
customize the functions on a per-environment bases.  But if these
environments are all pretty similar
- tabular*
- booktabs
- longtable
- tablex
- array
then I guess one single function is the way to go.

I'll add this to the library-of-babel.org in
contrib/babel/library-of-babel.org and please feel free to play around
with the function definition.  This file lives in the contrib directory
to encourage user participation -- in fact maybe the
library-of-babel.org (or a copy) should move to Worg.

Thanks -- Eric


 Best regards,
   Seb

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: latex export and booktabs tables

2010-06-27 Thread Eric Schulte
One way to deal with this without adding even more complexity to the
core of org-mode could be through the use of Library of Babel
functions.

The attached org-mode file provides a function for exporting to the
longtable environment with some example usage.  If this looks generally
useful it (and maybe similar functions) could be added to the library of
babel distributed w/Org-mode.

What do you think? -- Eric



longtable.org
Description: Binary data

Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 Hi Erik,

 Erik Butz wrote:
 I found a very old thread on the list about using the booktabs package to
 have nicer tables in latex export.

 I found that, making the changes below I can use the booktab package to
 export tables, and using standard tables only, this seems to work fine.

 Can anyone advice on whether this kind of change is meaningful or if this is
 likely to introduce difficulties elsewhere which I did not experience due to
 the limited scope of usage? It should be said that I did not at all look
 into longtables so far.

 While trying to improve this, I think one could extend it so that the table
 environment can be changed as well, from `tabular' to `array', `tabular*',
 `tabularx' or any other.

 There was a discussion on this, a while ago, by Francesco Pizzolante. Have a
 read at: http://www.mail-archive.com/emacs-orgmode@gnu.org/msg18311.html.

 Best regards,
   Seb
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: latex export and booktabs tables

2010-06-23 Thread Sébastien Vauban
Hi Erik,

Erik Butz wrote:
 I found a very old thread on the list about using the booktabs package to
 have nicer tables in latex export.

 I found that, making the changes below I can use the booktab package to
 export tables, and using standard tables only, this seems to work fine.

 Can anyone advice on whether this kind of change is meaningful or if this is
 likely to introduce difficulties elsewhere which I did not experience due to
 the limited scope of usage? It should be said that I did not at all look
 into longtables so far.

While trying to improve this, I think one could extend it so that the table
environment can be changed as well, from `tabular' to `array', `tabular*',
`tabularx' or any other.

There was a discussion on this, a while ago, by Francesco Pizzolante. Have a
read at: http://www.mail-archive.com/emacs-orgmode@gnu.org/msg18311.html.

Best regards,
  Seb

-- 
Sébastien Vauban


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: latex export - skipping lvls breaks export

2010-06-22 Thread Sebastian Hofer
At Tue, 22 Jun 2010 11:51:30 +0200,
Giovanni Ridolfi wrote:
 
 Sebastian Hofer sebho...@gmail.com writes:
 
  I'm working on a customized latex-export-class for a CV.
 nice!
  I noticed that if you skip a level in the outline structure
  (cf. example below) it is not exported to latex. 
  Is there a reason for this 
 IIRC it depends in how is written the LaTeX export.
 (I thought I've read recently this answer by Carsten, but, unfortunately,
 I can't find the citation in the list archive)
 
  or could this be changed easily? 
 IMHO skipping a level it's  Spock voice a bit illogical 
 ;-)
I guess it depends on the situation, it may or may not be illogical.
Anyway, I don't see a reason why the user should not be allowed to decide 
himself or herself to skip a level.

Cheers,
Sebastian




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: latex export - skipping lvls breaks export

2010-06-22 Thread Robert Hennig
Sebastian Hofer wrote:
 At Tue, 22 Jun 2010 11:51:30 +0200,
 Giovanni Ridolfi wrote:
 Sebastian Hofer sebho...@gmail.com writes:

 I'm working on a customized latex-export-class for a CV.
 nice!
 I noticed that if you skip a level in the outline structure
 (cf. example below) it is not exported to latex. 
 Is there a reason for this 
 IIRC it depends in how is written the LaTeX export.
 (I thought I've read recently this answer by Carsten, but, unfortunately,
 I can't find the citation in the list archive)

 or could this be changed easily? 
 IMHO skipping a level it's  Spock voice a bit illogical 
 ;-)
 I guess it depends on the situation, it may or may not be illogical.
 Anyway, I don't see a reason why the user should not be allowed to decide 
 himself or herself to skip a level.
 
 Cheers,
 Sebastian
 

I'm working on the translation of a book and the Table of Contents has a
odd structure. I would also appreciate if skipping a level in the
structure could be possible. One reason to have this working is
if you want to have a itemized outline at several levels.

Best regards,
Robert Hennig
 
 
 
 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: latex export - skipping lvls breaks export

2010-06-22 Thread Carsten Dominik


On Jun 22, 2010, at 2:51 PM, Robert Hennig wrote:


Sebastian Hofer wrote:

At Tue, 22 Jun 2010 11:51:30 +0200,
Giovanni Ridolfi wrote:

Sebastian Hofer sebho...@gmail.com writes:


I'm working on a customized latex-export-class for a CV.

nice!

I noticed that if you skip a level in the outline structure
(cf. example below) it is not exported to latex.
Is there a reason for this

IIRC it depends in how is written the LaTeX export.
(I thought I've read recently this answer by Carsten, but,  
unfortunately,

I can't find the citation in the list archive)


or could this be changed easily?

IMHO skipping a level it's  Spock voice a bit illogical
;-)

I guess it depends on the situation, it may or may not be illogical.
Anyway, I don't see a reason why the user should not be allowed to  
decide himself or herself to skip a level.


Cheers,
Sebastian



I'm working on the translation of a book and the Table of Contents  
has a

odd structure. I would also appreciate if skipping a level in the
structure could be possible. One reason to have this working is
if you want to have a itemized outline at several levels.



I have nothing against skipping levels - the HTML exporter
allows it.  But, the LaTeX exporter does not.  If someone can
come up with a good patch, I'd consider putting it in.  The
patch may not be trivial though...

- Carsten


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: latex export - skipping lvls breaks export

2010-06-22 Thread Nick Dokos
Sebastian Hofer sebho...@gmail.com wrote:

 At Tue, 22 Jun 2010 11:51:30 +0200,
 Giovanni Ridolfi wrote:
  
  Sebastian Hofer sebho...@gmail.com writes:
  
   I'm working on a customized latex-export-class for a CV.
  nice!
   I noticed that if you skip a level in the outline structure
   (cf. example below) it is not exported to latex. 
   Is there a reason for this 
  IIRC it depends in how is written the LaTeX export.
  (I thought I've read recently this answer by Carsten, but, unfortunately,
  I can't find the citation in the list archive)
  
   or could this be changed easily? 
  IMHO skipping a level it's  Spock voice a bit illogical 
  ;-)
 I guess it depends on the situation, it may or may not be illogical.
 Anyway, I don't see a reason why the user should not be allowed to decide 
 himself or herself to skip a level.
 

If the outline tree were a real tree, skipping a level would be
equivalent to chopping out a node somewhere in the middle. Would you
expect the tree to stay intact?

Tongue-firmly-in-cheek-ly yours,
Nick

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: latex export - skipping lvls breaks export

2010-06-22 Thread Sébastien Vauban
Hi all,

Carsten Dominik wrote:
 On Jun 22, 2010, at 2:51 PM, Robert Hennig wrote:
 Sebastian Hofer wrote:
 Giovanni Ridolfi wrote:
 Sebastian Hofer sebho...@gmail.com writes:

 I noticed that if you skip a level in the outline structure (cf. example
 below) it is not exported to latex. Is there a reason for this?

 IIRC it depends in how is written the LaTeX export.

 IMHO skipping a level it's  Spock voice a bit illogical

 I guess it depends on the situation, it may or may not be illogical.

 I'm working on the translation of a book and the Table of Contents has a
 odd structure. I would also appreciate if skipping a level in the structure
 could be possible.

 I have nothing against skipping levels - the HTML exporter allows it. But,
 the LaTeX exporter does not. If someone can come up with a good patch, I'd
 consider putting it in. The patch may not be trivial though...

Just for the sake of completeness, here is another (very) good reason to allow
such a thing: for Beamer, with the sidebar outer theme, which allows you to
see, on every slide, where you are in the TOC (up to 2 levels).

If you have such a TOC:

--8---cut here---start-8---
1. Intro
2. The meat
   1. Why?
   2. Why not?
3. Conclusion
--8---cut here---end---8---

and have frames level beginning at 3, you would have in Org:

--8---cut here---start-8---
* Intro

*** Introduction

This is first slide.

* The meat

** Why?

*** Why to do this?

Second slide.

** Why not?

*** Why not to do this?

Third slide.

* Conclusion

*** Conclusion

Last slide.
--8---cut here---end---8---

So, the solutions are:

1. To allow for skipped levels
   - Sidebar is exactly as it should.

2. Not to export skipped levels
   - You need to insert a level-2 for the Introduction and Conclusion

   a. Empty title (such as `** ')
  - Empty space in the TOC displayed in the sidebar
  - Bad!

   b. Repeat the title of level-1
  - Not nice...

So, allowing for skipped levels seems the only nice way for me. Did you follow
me?

Best regards,
  Seb

-- 
Sébastien Vauban


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: latex export - skipping lvls breaks export

2010-06-22 Thread Sebastian Hofer
At Tue, 22 Jun 2010 15:06:08 +0200,
Carsten Dominik wrote:
 
 
 On Jun 22, 2010, at 2:51 PM, Robert Hennig wrote:
 
  Sebastian Hofer wrote:
  At Tue, 22 Jun 2010 11:51:30 +0200,
  Giovanni Ridolfi wrote:
  Sebastian Hofer sebho...@gmail.com writes:
 
  I'm working on a customized latex-export-class for a CV.
  nice!
  I noticed that if you skip a level in the outline structure
  (cf. example below) it is not exported to latex.
  Is there a reason for this
  IIRC it depends in how is written the LaTeX export.
  (I thought I've read recently this answer by Carsten, but,  
  unfortunately,
  I can't find the citation in the list archive)
 
  or could this be changed easily?
  IMHO skipping a level it's  Spock voice a bit illogical
  ;-)
  I guess it depends on the situation, it may or may not be illogical.
  Anyway, I don't see a reason why the user should not be allowed to  
  decide himself or herself to skip a level.
 
  Cheers,
  Sebastian
 
 
  I'm working on the translation of a book and the Table of Contents  
  has a
  odd structure. I would also appreciate if skipping a level in the
  structure could be possible. One reason to have this working is
  if you want to have a itemized outline at several levels.
 
 
 I have nothing against skipping levels - the HTML exporter
 allows it.  But, the LaTeX exporter does not.  If someone can
 come up with a good patch, I'd consider putting it in.  The
 patch may not be trivial though...
 
I will try to come up with one, but I'm not sure I can do it as my lisp skills 
are still quite basic. So if anyone else wants to take a
shot at this, I'm thankful for any help!
Thanks for the clarification though!

Cheers,
Sebastian



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: latex export on mac os x with xelatex

2010-02-22 Thread Christian Wittern
Hi there,

For the benefit of later visitors, here is how I worked around the problem
for the moment:

orgmode seems to ignore the exec-path, so I looked at the result of
(getenv PATH), which was very little. Saying

(setenv PATH (concat /usr/local/texlive/2009/bin/universal-darwin:
(getenv PATH)))

in my .emacs solved the problem, the latex export now happily works its way
to the texlive programs and does what it needs to do.  So I suspect this is
some kind of setup problem that might be specific to my installation.  I
will see if I can find out more once I have a little time.

Thanks for your time:-)

All the best,

Christian


On 2010-02-22 16:34, Christian Wittern wrote:
 Dear Orgmode users,
 
 I am trying to get Latex export working on a Mac OS X system.  I have
 installed MacTex with the whole texlive tree.  I added the path to these
 binaries to exec-path like so:
 
 (if (eq window-system 'mac)
  (add-to-list 'exec-path /usr/local/texlive/2009/bin/universal-darwin)
 )
 
 and can confirm that it is indeed picked up and existing in the exec-path.
 
 However, org-export-as-pdf does not manage to produce a pdf.
 
 Next I customized the variable to include the path so that I have
 
 /usr/local/texlive/2009/bin/universal-darwin/xelatex -interaction
 nonstopmode %s (on one line) as the value of org-latex-to-pdf-process.
 
 Now the xelatex command runs, but the next step fails, since xelatex can not
 convert its intermediate file to a pdf, so I get as the first line in the
 buffer *Org PDF Latex Output* :
 
 sh: xdvipdfmx: command not found
 
 But now I have no idea where to go to tell orgmode how to find the command
 -- someting seems to be seriously wrong (or I am misunderstanding how stuff
 is supposed to work) so any help would be appreciated.
 
 All the best,
 
 Christian


-- 
 Christian Wittern
 Institute for Research in Humanities, Kyoto University
 47 Higashiogura-cho, Kitashirakawa, Sakyo-ku, Kyoto 606-8265, JAPAN


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [LaTeX-Export] Longtable and Caption

2009-12-17 Thread Ulf Stegemann
Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com wrote:

 On Dec 3, 2009, at 4:22 PM, Ulf Stegemann wrote:

 Carsten Dominik carsten.domi...@gmail.com wrote:

 it was my understanding that the caption command in longtable is different
 from the caption command in normal tables, in that it is a  line that is
 printed over the table on each page - so I thought it  always needs to be
 there.  Is that not correct?

 yes, treatment is different but nevertheless the caption is not
 mandatory for longtable. I never had any problems with longtable tables
 without \caption{}.

 sorry for being so slow to process this request.

 I believe this works now as you requested, please verify.

thanks for having a look at it (no need to apologise for the delay, it's
certainly not an urgent matter).

Captions are now suppressed for longtables without caption definition.
However, I've noticed that the extra linebreak (\\) is still inserted in
longtable environments regardless of the presence of a caption. That
linebreak leads to undesired effects when using longtable without a
caption but with vertical lines.

This should fix it:

--- org-latex.el.orig	2009-12-17 08:10:19.0 +0100
+++ org-latex.el	2009-12-17 08:49:02.0 +0100
@@ -1538,7 +1538,7 @@
  \\caption{%s%s}
  (if label (concat \\\label{ label }) )
  (or caption )))
-(if longtblp \n \n)
+(if (and longtblp caption) \n \n)
 (if (and org-export-latex-tables-centered (not longtblp))
 \\begin{center}\n)
 (if (not longtblp) (concat \\begin{tabular}{ align }\n))

Ulf
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [LaTeX-Export] Longtable and Caption

2009-12-17 Thread Carsten Dominik

Applied, thanks.

- Carsten

On Dec 17, 2009, at 8:59 AM, Ulf Stegemann wrote:


Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com wrote:


On Dec 3, 2009, at 4:22 PM, Ulf Stegemann wrote:


Carsten Dominik carsten.domi...@gmail.com wrote:

it was my understanding that the caption command in longtable is  
different
from the caption command in normal tables, in that it is a  line  
that is
printed over the table on each page - so I thought it  always  
needs to be

there.  Is that not correct?


yes, treatment is different but nevertheless the caption is not
mandatory for longtable. I never had any problems with longtable  
tables

without \caption{}.


sorry for being so slow to process this request.

I believe this works now as you requested, please verify.


thanks for having a look at it (no need to apologise for the delay,  
it's

certainly not an urgent matter).

Captions are now suppressed for longtables without caption definition.
However, I've noticed that the extra linebreak (\\) is still  
inserted in

longtable environments regardless of the presence of a caption. That
linebreak leads to undesired effects when using longtable without a
caption but with vertical lines.

This should fix it:

--- org-latex.el.orig   2009-12-17 08:10:19.0 +0100
+++ org-latex.el2009-12-17 08:49:02.0 +0100
@@ -1538,7 +1538,7 @@
 \\caption{%s%s}
 (if label (concat \\\label{ label  
}) )

 (or caption )))
-(if longtblp \n \n)
+(if (and longtblp caption) \n \n)
(if (and org-export-latex-tables-centered  
(not longtblp))

\\begin{center}\n)
(if (not longtblp) (concat \\begin{tabular} 
{ align }\n))


Ulf
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


- Carsten





___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [LaTeX-Export] Longtable and Caption

2009-12-16 Thread Carsten Dominik


On Dec 3, 2009, at 4:22 PM, Ulf Stegemann wrote:


Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com wrote:

it was my understanding that the caption command in longtable is  
different
from the caption command in normal tables, in that it is a  line  
that is
printed over the table on each page - so I thought it  always needs  
to be

there.  Is that not correct?


yes, treatment is different but nevertheless the caption is not
mandatory for longtable. I never had any problems with longtable  
tables

without \caption{}.


Hi Ulf,

sorry for being so slow to process this request.

I believe this works now as you requested, please verify.

- Carsten



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Latex export and label entries

2009-12-08 Thread d . tchin
Hi

Carsten Dominik carsten.dominik at gmail.com writes:

 
 Hi,
 On Dec 2, 2009, at 2:51 PM, d.tchin at voila.fr wrote:
 
 
  Hi,
 
  I use org-export-latex to create latex powerdot
  file. I make adaptation of template defined for
  beamer class and it works quite well.
 
  I have a problem I would like to submit :
 
  By default in each section or slide (frame) environment,
  there is a label added by default. This instruction
  is not recognized by powerdot class. Is there a way
  to prevent org-export-latex function to add such label
  entries ?
 
 a work-around would be to add this to your powerdot definition of org- 
 export-latex-classes:
 
 \def\label#1{}
 

Thank you for the advice. I add the instruction you suggest.
with org-export-latex-classes. In fact it work if this intruction
appears after \begin{document}. 
I have managed to add it before \begin{document} with 
org-export-latex-classes but not after . How could I make appear
this intruction only one time after \begin{document} ?

Regards




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Latex export and label entries

2009-12-08 Thread Carsten Dominik


On Dec 3, 2009, at 8:37 PM, d.tchin wrote:


Hi

Carsten Dominik carsten.dominik at gmail.com writes:



Hi,
On Dec 2, 2009, at 2:51 PM, d.tchin at voila.fr wrote:



Hi,

I use org-export-latex to create latex powerdot
file. I make adaptation of template defined for
beamer class and it works quite well.

I have a problem I would like to submit :

By default in each section or slide (frame) environment,
there is a label added by default. This instruction
is not recognized by powerdot class. Is there a way
to prevent org-export-latex function to add such label
entries ?


a work-around would be to add this to your powerdot definition of  
org-

export-latex-classes:

\def\label#1{}



Thank you for the advice. I add the instruction you suggest.
with org-export-latex-classes. In fact it work if this intruction
appears after \begin{document}.
I have managed to add it before \begin{document} with
org-export-latex-classes but not after . How could I make appear
this intruction only one time after \begin{document} ?


#+LaTeX: \def\label#1{}

HTH

- Carsten



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [LaTeX-Export] Longtable and Caption

2009-12-03 Thread Ulf Stegemann
Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com wrote:

 it was my understanding that the caption command in longtable is different
 from the caption command in normal tables, in that it is a  line that is
 printed over the table on each page - so I thought it  always needs to be
 there.  Is that not correct?

yes, treatment is different but nevertheless the caption is not
mandatory for longtable. I never had any problems with longtable tables
without \caption{}.

Ulf




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: latex export and beamer columns

2009-11-26 Thread Eric S Fraga
At Thu, 26 Nov 2009 02:52:04 +0100,
Łukasz Stelmach wrote:
 
 I've just tried something simplier and IMHO more flexible (widths).
 
 --8---cut here---start-8---
 * The Title
 ** The Section
 *** The Frame
 #+latex: \begin{columns}[t]
 #+latex: \column{.5\textwidth}
- My point
- Your point
 #+latex: \column{.5\textwidth}
 Conclusion
 #+latex: \end{columns}
 --8---cut here---end---8---
 
 Unfortunately the the plain list is not recognized and converted to
 itemize. When I remove the #+latex: \begin|end stuff then the list
 looks as it should.


(note that my response has probably been superseded by Carsten's
recent message regarding beamer support in org mode but this still
might be of some interest)


I am not sure what to say!  IMO, it's not simpler although I guess it
could be more flexible.  However, you say it doesn't work?

One alternative based on your approach is to define begin and end
commands for the columns environment that avoid using \begin and
\end which org interprets.  Maybe something like this:

--8---cut here---start-8---
#+LaTeX_CLASS: beamer 

#+latex: \newcommand{\BC}{\begin{columns}[t]}
#+latex: \newcommand{\EC}{\end{columns}}

* The main section
*** An interesting slide
\BC
#+latex: \column{0.4\textwidth}
- an item with enough text to show the width of the column
- another item
#+latex: \column{0.6\textwidth}
- an item with enough text to show the width of the column
- and yet another
\EC
--8---cut here---end---8---

which appears to work just fine.  Whether it's simpler or not depends
on what you want.  I like using org headlines to be able to hide
individual columns and to be able to move them around easily.


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: latex export and beamer columns

2009-11-26 Thread Darlan Cavalcante Moreira

Maybe a simpler notation could be used instead direct latex since we are talking
about official support for beamer in org-mode. For instance

,
| * Teste beamer: This is a Section
| *** Teste beamer: This is a Subsection
| * This is the frame title
|   Frame content
| 
| * This is the frame title of another frame
| #+\{0.4
|   - This is an item
|   - This is an item too
| #+\\0.6
|   - Another item
|   - Another one
|   - One more item
| \note[item]{lala}
| #+\}
`

The #+\{ comment indicates the beginning of a columns environment and the
0.4 the width (0.4\textwidth) of the first column. The #+\\0.6 comment
creates another column and the #+\} comment closes the columns
environment. I'm not saying this is the best way, but IMHO this is better than
using #+latex commands directly, since beamer support in org-mode will be
official. Also, this will export nicely to standard latex and HTML. Using
#+latex: could cause problems when exporting to standard latex and using
headings as suggested in other E-mails here could me exporting to anything
different from beamer unnatural.

If this syntax or something similar is used, I'd like to request only two thinks
in addition:
  1) the items in the different columns should be exported to different
 itemize environments when exporting to standard latex (similarly to HTML). 
If
 they are exported to the same environment it can be confusing.
  2) It would be nice if the width could be optional. If there are columns whose
 width is not specified then org could sum the widths that were specified
 and distribute the remaining among the columns whose width is not
 specified. For instance, in a frame with 3 columns I could specify the
 width of one column as 0.4 and leave the others unspecified. Org should
 then choose a width of 0.3 for the remaining two columns.


- Darlan Cavalcante


At Thu, 26 Nov 2009 18:25:19 +,
Eric S Fraga ucec...@ucl.ac.uk wrote:
 
 At Thu, 26 Nov 2009 02:52:04 +0100,
 Łukasz Stelmach wrote:
  
  I've just tried something simplier and IMHO more flexible (widths).
  
  --8---cut here---start-8---
  * The Title
  ** The Section
  *** The Frame
  #+latex: \begin{columns}[t]
  #+latex: \column{.5\textwidth}
 - My point
 - Your point
  #+latex: \column{.5\textwidth}
  Conclusion
  #+latex: \end{columns}
  --8---cut here---end---8---
  
  Unfortunately the the plain list is not recognized and converted to
  itemize. When I remove the #+latex: \begin|end stuff then the list
  looks as it should.
 
 
 (note that my response has probably been superseded by Carsten's
 recent message regarding beamer support in org mode but this still
 might be of some interest)
 
 
 I am not sure what to say!  IMO, it's not simpler although I guess it
 could be more flexible.  However, you say it doesn't work?
 
 One alternative based on your approach is to define begin and end
 commands for the columns environment that avoid using \begin and
 \end which org interprets.  Maybe something like this:
 
 --8---cut here---start-8---
 #+LaTeX_CLASS: beamer 
 
 #+latex: \newcommand{\BC}{\begin{columns}[t]}
 #+latex: \newcommand{\EC}{\end{columns}}
 
 * The main section
 *** An interesting slide
 \BC
 #+latex: \column{0.4\textwidth}
 - an item with enough text to show the width of the column
 - another item
 #+latex: \column{0.6\textwidth}
 - an item with enough text to show the width of the column
 - and yet another
 \EC
 --8---cut here---end---8---
 
 which appears to work just fine.  Whether it's simpler or not depends
 on what you want.  I like using org headlines to be able to hide
 individual columns and to be able to move them around easily.
 
 
 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: latex export and beamer columns

2009-11-23 Thread Sébastien Vauban
Hi Eric and Carsten,

Eric S Fraga wrote:
 At Sat, 21 Nov 2009 14:34:18 +0100, Carsten Dominik wrote:
 
 Anything missing in Org that we should implement to support this better?

 At the moment, the only thing that is missing in org-mode to beamer is some
 way to specify arguments to the \frame command, options such as
 [shrink] or [t]. At the moment, there is no mechanism that supports
 this.  Something like attr_frame may be necessary just as we do with
 figures.

I think another needed feature is for source code insertion. Then, one needs
to set the frames as fragile. This could be best supported on a frame per
frame basis.

For the rest, I'm more than glad that Beamer will become an official target
for Org. This is clearly wonderful.

Best regards,
  Seb

-- 
Sébastien Vauban



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: latex export and beamer columns

2009-11-22 Thread Matt Lundin
Eric S Fraga ucec...@ucl.ac.uk writes:

 At Sat, 21 Nov 2009 14:34:18 +0100,
 Carsten Dominik wrote:

  Anything missing in Org that we should implement to support this
  better?

 Actually, going through the set of lectures I am currently preparing,
 I am finding that there is one thing missing that I haven't needed
 before in latex export: the ability to centre a figure without having
 to use a float environment.  

 Back in September, early October, there was a thread about image
 placement in latex export:

 http://article.gmane.org/gmane.emacs.orgmode/18174/

 There was a number of use cases discussed: inline placement versus
 float placement.  There is one use case missing, one that is
 particularly useful for presentations, although not often necessary
 for articles say, namely a figure centred on a line without a caption
 and without floating.  This seemed to be present at some point in the
 past but has disappeared, unless I have misunderstood the state of
 play...

 Basically, I would like to do something like:

 ,
 |   In a double pipe heat exchanger,
 | 
 |   [[file:images/double-pipe-heat-exchanger.png]]
 | 
 |   the heat transfer etc. ad nauseum...
 `

 and have that figure centred on the line instead of left aligned as it
 would currently appear.

 If I add a #+label: the image does appear centred but as this is done
 by using a latex figure environment, a Figure: caption (empty) is
 added which isn't particularly useful in this case!

 There *is* a solution, but it's a bit messy, e.g.:

 ,
 | 
 | \hfill
 | #+attr_latex: width=0.6\textwidth
 | [[file:images/double-pipe-heat-exchanger.png]]
 | \hspace*{\fill} \\
 | 
 `

 By the way, an \hfill at the end is not sufficient to centre the image.

 I have no solution to propose for incorporating something like this
 into org-mode other than possibly making use of a placement=centre
 (oops, center if you prefer american spelling) option on attr_latex
 which would put the includegraphics within a \centerline or \centering
 environment.

I've only used Beamer a few times, but I use the center environment to
center images. Could you perhaps use the following?

,
| In a double pipe heat exchanger,
| 
| #+begin_center
| [[file:images/double-pipe-heat-exchanger.png]]
| #+end_center
|  
| the heat transfer etc. ad nauseum...
`

Best,
Matt


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: latex export and beamer columns

2009-11-22 Thread Eric S Fraga
At Sun, 22 Nov 2009 10:29:47 -0500,
Matt Lundin wrote:

[...]

 I've only used Beamer a few times, but I use the center environment to
 center images. Could you perhaps use the following?
 
 ,
 | In a double pipe heat exchanger,
 | 
 | #+begin_center
 | [[file:images/double-pipe-heat-exchanger.png]]
 | #+end_center
 |  
 | the heat transfer etc. ad nauseum...
 `
 
 Best,
 Matt

Excellent suggestion!  I didn't know about begin_center (sigh).  I
think this will work well in general.  

There is one case where it won't and that's within a list as the latex
generated is wrong in the same way it is for a figure environment
within a list (cf. the message earlier today from me).

Many thanks,
eric


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX export of section links

2009-11-20 Thread Bernt Hansen


Francesco Pizzolante
fpz-djc/ipccudyqhejpep6iedvlejwur...@public.gmane.org writes:

 Hi,

 I have a few questions about links to sections.

 I've read that it is better to user IDs and CUSTOM_IDs to links to section...

 Here's a small example with 4 cases:

 --8---cut here---start-8---
 * First
   :PROPERTIES:
   :CUSTOM_ID: heading-a
   :END:

   Hello Toto!

 * Second
 # heading-b

   Hello Tata!

 * Third
 #+CUSTOM_ID: heading-c

   Hello Titi!

 * Fourth
 #+ID: heading-d

   Hello Tete!

 [[heading-a]]
 [[heading-b]]
 [[heading-c]]
 [[heading-d]]
 --8---cut here---end---8---

 Which give the following LaTeX code:

 --8---cut here---start-8---
 \section{First}
 \label{sec-1}
 \label{heading-a}


   Hello Toto!

 \section{Second}
 \label{sec-2}
 \label{heading-b}


   Hello Tata!

 \section{Third}
 \label{sec-3}


   Hello Titi!

 \section{Fourth}
 \label{sec-4}


   Hello Tete!

 \hyperref[sec-1]{heading-a}
 \hyperref[sec-2]{heading-b}
 \hyperref[sec-3]{heading-c}
 \hyperref[sec-4]{heading-d}
 --8---cut here---end---8---

 The first and second cases both generate labels which are not used in LaTeX.

 The third and fourth cases are very elegant as they use only aliases (which
 are dropped from the LaTeX code).

 My questions are:

 - what's the difference between using ID and CUSTOM_ID?

 - the cases Third and Fourth are the more elegant from my point of view.
   Is this the right way of doing?

 - what's the difference between cases First and Second (I mean between
   using PROPERTIES and # X)?

 - in the documentation (section 4.2), we talk about CUSTOM_ID property does
   it mean that we should use it as in case 1?

I use the CUSTOM_ID property for HTML exports (not LaTeX).

The ID property is automatically generated for me when I link to a task
and is a unique identifier for that heading across all of my org files.

,
| * Some Task
|   :PROPERTIES:
|   :ID:   1329fa08-3c1d-4b73-b984-bef414b0dd3d
|   :END:
`

This allows me to have more than one 'Some Task' in my files and each
will have a unique ID so that linking to it finds the correct one.

CUSTOM_IDs are a way to create links using a user-defined name.  I use
this for my org-mode document at http://doc.norang.ca/org-mode.html so
that I can reference a section by name such as
http://doc.norang.ca/org-mode.html#Publishing

If I later insert a section before Publishing the link still goes to the
correct place.  Without the CUSTOM_ID property I get a link like
http://doc.norang.ca/org-mode.html#sec-13 which may stop working if the
document sections are moved around.

I'm not sure what this buys you in LaTeX since I don't think the
CUSTOM_ID names are exposed in the links (correct me if I'm wrong).

I don't think the

#+CUSTOM_ID: name
#+ID: name

forms are valid.  These should be properties.  The above names are
probably just ignored during the export process.

HTH,
Bernt



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export of images

2009-10-20 Thread Carsten Dominik


On Oct 13, 2009, at 12:03 PM, Francesco Pizzolante wrote:


Hi Carsten,

Sorry for my late reply on this subject.


OK, I have now modified image placement in LaTeX.

1. Image in text

  [[./img/x.png]]

2. Floating image with caption and modified size and placement

  #+CAPTION: My caption
  #+ATTR_LATEX: placement=[H] width=0.6\textwidth
  [[./img/x.png]]

3. Wrapping text around the image

  #+ATTR_LaTeX: wrap
  #+ATTR_HTML: align=left
  [[./img/x.png]]

4. Wrapping text around the image with modified size and wrapfigure  
placement


  #+ATTR_LaTeX: wrap width=0.38\textwidth placement={r}{0.4\textwidth
  #+ATTR_HTML: align=right width=250
  [[./img/x.png]]

Even if there is a caption, wrap will work and force the
image to be non-floating with text wrapped around.

Comments?


I did not test the wrap option yet, but the rest is perfect (images  
in text,

placements, width, captions, labels).

I still miss one single option: float in order to force the  
centered figure

environment if if no caption/label is present.

I would add something like

#+ATTR_LATEX: float



Have you actually tried?  The following works for me.


#+ATTR_LaTeX: float
[[./blue_1.png]]
This is text

- Carsten



or

#+ATTR_LATEX: float=t

Is this feasible?

Thanks a lot!

Francesco


- Carsten





___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export of images

2009-10-13 Thread Francesco Pizzolante
Hi Carsten,

Sorry for my late reply on this subject.

 OK, I have now modified image placement in LaTeX.

 1. Image in text

[[./img/x.png]]

 2. Floating image with caption and modified size and placement

#+CAPTION: My caption
#+ATTR_LATEX: placement=[H] width=0.6\textwidth
[[./img/x.png]]

 3. Wrapping text around the image

#+ATTR_LaTeX: wrap
#+ATTR_HTML: align=left
[[./img/x.png]]

 4. Wrapping text around the image with modified size and wrapfigure placement

#+ATTR_LaTeX: wrap width=0.38\textwidth placement={r}{0.4\textwidth
#+ATTR_HTML: align=right width=250
[[./img/x.png]]

 Even if there is a caption, wrap will work and force the
 image to be non-floating with text wrapped around.

 Comments?

I did not test the wrap option yet, but the rest is perfect (images in text,
placements, width, captions, labels).

I still miss one single option: float in order to force the centered figure
environment if if no caption/label is present.

I would add something like

#+ATTR_LATEX: float

or

#+ATTR_LATEX: float=t

Is this feasible?

Thanks a lot!

Francesco


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export of images

2009-10-05 Thread Darlan Cavalcante Moreira
At Sat, 3 Oct 2009 09:05:38 +0200,
Carsten Dominik wrote:
 
 
 On Oct 2, 2009, at 5:23 PM, Nick Dokos wrote:
 
  Darlan Cavalcante Moreira darc...@gmail.com wrote:
 
  At Fri, 2 Oct 2009 08:55:22 +0200,
  Carsten Dominik wrote:
  Do we need to implement a way so that text can be made to flow  
  around
  a figure, just as it is possible in HTML export?  What would be the
  right LaTeX package to use for this purpose?
 
  The Latex wikibook
  http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Wrapping_text_around_figures
  suggests the wrapfigure package, but it also warns that some manual  
  adjustments
  is often required. Therefore, if this is implemented in the latex  
  exporter it is
  probably a good idea to provide options to include latex commands  
  that will be
  put before and after the \includegraphics command. See the example  
  in the
  section Tip for figures with too much white space of the wikibook  
  where some
  \vspace were used to adjust white space around the figure.
 
 
  ... and the TeX FAQ seems to agree that wrapfig is probably the best  
  option:
 
 http://www.tex.ac.uk/cgi-bin/texfaq2html?label=textflow
 
  It also mentions some additional limitations.
 
  Nick
 
 
 
 OK, I have now modified image placement in LaTeX.
 
 1. Image in text
 
 [[./img/x.png]]
 
 2. Floating image with caption and modified size and placement
 
 #+CAPTION: My caption
 #+ATTR_LATEX: placement=[H] width=0.6\textwidth
 [[./img/x.png]]
 
 3. Wrapping text around the image
 
 #+ATTR_LaTeX: wrap
 #+ATTR_HTML: align=left
 [[./img/x.png]]
 
 4. Wrapping text around the image with modified size and wrapfigure  
 placement
 
 #+ATTR_LaTeX: wrap width=0.38\textwidth placement={r}{0.4\textwidth
 #+ATTR_HTML: align=right width=250
 [[./img/x.png]]
 
 Even if there is a caption, wrap will work and force the
 image to be non-floating with text wrapped around.
 
 Comments?
 
 - Carsten
 
 P.S. if you have customized org-export-latex-classes, you might have  
 to undo, then redo this customization, or add the float and wrapfigure  
 environments by hand
 to all classes you want to use.
 
 

I haven't tested it yet, but this seems to the best way to do it.
Thanks Carsten.

-- 
Darlan Cavalcante Moreira
darc...@gmail.com


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export of images

2009-10-03 Thread Carsten Dominik


On Oct 2, 2009, at 5:23 PM, Nick Dokos wrote:


Darlan Cavalcante Moreira darc...@gmail.com wrote:


At Fri, 2 Oct 2009 08:55:22 +0200,
Carsten Dominik wrote:
Do we need to implement a way so that text can be made to flow  
around

a figure, just as it is possible in HTML export?  What would be the
right LaTeX package to use for this purpose?


The Latex wikibook
http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Wrapping_text_around_figures
suggests the wrapfigure package, but it also warns that some manual  
adjustments
is often required. Therefore, if this is implemented in the latex  
exporter it is
probably a good idea to provide options to include latex commands  
that will be
put before and after the \includegraphics command. See the example  
in the
section Tip for figures with too much white space of the wikibook  
where some

\vspace were used to adjust white space around the figure.



... and the TeX FAQ seems to agree that wrapfig is probably the best  
option:


   http://www.tex.ac.uk/cgi-bin/texfaq2html?label=textflow

It also mentions some additional limitations.

Nick




OK, I have now modified image placement in LaTeX.

1. Image in text

   [[./img/x.png]]

2. Floating image with caption and modified size and placement

   #+CAPTION: My caption
   #+ATTR_LATEX: placement=[H] width=0.6\textwidth
   [[./img/x.png]]

3. Wrapping text around the image

   #+ATTR_LaTeX: wrap
   #+ATTR_HTML: align=left
   [[./img/x.png]]

4. Wrapping text around the image with modified size and wrapfigure  
placement


   #+ATTR_LaTeX: wrap width=0.38\textwidth placement={r}{0.4\textwidth
   #+ATTR_HTML: align=right width=250
   [[./img/x.png]]

Even if there is a caption, wrap will work and force the
image to be non-floating with text wrapped around.

Comments?

- Carsten

P.S. if you have customized org-export-latex-classes, you might have  
to undo, then redo this customization, or add the float and wrapfigure  
environments by hand

to all classes you want to use.




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export of images

2009-10-02 Thread Carsten Dominik


On Sep 23, 2009, at 11:09 PM, Sébastien Vauban wrote:


Jeff Kowalczyk wrote:

Sébastien Vauban wxhgmqzgw...@... writes:

Francesco Pizzolante wrote:
In this case, we should just generate \includegraphics{myimage}  
without

the centerline command.


Given the output of the `\centerline' command, I guess that the  
inlining of
an image inside a line of text is not supported as is by Org. I  
can second

such a choice.


+1 for default to inline graphics. When using Org for How-To and  
project
documentation delivered as PDF, floating screenshot-size images  
typically

situate far from the descriptive text.


My point was mainly that, IMHO, floating or not should not be tied  
to the

presence or absence of caption/label.


I don't understand why not.  Can you try to explain again?

Thanks.

- Carsten




Your problem with screenshots far away should be solved by putting  
the H

specifier to the float environment and loading the `float' package.


Maybe we need a way to specify the figure placement argument in # 
+LaTeX_ATTR:


Do we need to implement a way so that text can be made to flow around  
a figure, just as it is possible in HTML export?  What would be the  
right LaTeX package to use for this purpose?


Thanks.

- Carsten





I would prefer inline images by default (or option), and a file/ 
subtree

level option to use LaTeX floating layout.


That'd be a great way to be able to specify which type of inlining  
we want.

On a per file basis seems sufficient for me.

Best regards,
Seb

--
Sébastien Vauban



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export of images

2009-10-02 Thread Darlan Cavalcante Moreira
At Fri, 2 Oct 2009 08:55:22 +0200,
Carsten Dominik wrote:
 
 
 On Sep 23, 2009, at 11:09 PM, Sébastien Vauban wrote:
 
  Jeff Kowalczyk wrote:
  Sébastien Vauban wxhgmqzgw...@... writes:
  Francesco Pizzolante wrote:
  In this case, we should just generate \includegraphics{myimage}  
  without
  the centerline command.
 
  Given the output of the `\centerline' command, I guess that the  
  inlining of
  an image inside a line of text is not supported as is by Org. I  
  can second
  such a choice.
 
  +1 for default to inline graphics. When using Org for How-To and  
  project
  documentation delivered as PDF, floating screenshot-size images  
  typically
  situate far from the descriptive text.
 
  My point was mainly that, IMHO, floating or not should not be tied  
  to the
  presence or absence of caption/label.
 
 I don't understand why not.  Can you try to explain again?
 
 Thanks.
 
 - Carsten
 
 
 
  Your problem with screenshots far away should be solved by putting  
  the H
  specifier to the float environment and loading the `float' package.
 
 Maybe we need a way to specify the figure placement argument in # 
 +LaTeX_ATTR:
 
 Do we need to implement a way so that text can be made to flow around  
 a figure, just as it is possible in HTML export?  What would be the  
 right LaTeX package to use for this purpose?
 
 Thanks.
 
 - Carsten
 
 
 
 
  I would prefer inline images by default (or option), and a file/ 
  subtree
  level option to use LaTeX floating layout.
 
  That'd be a great way to be able to specify which type of inlining  
  we want.
  On a per file basis seems sufficient for me.
 
  Best regards,
  Seb
 
  -- 
  Sébastien Vauban
 
 
 
  ___
  Emacs-orgmode mailing list
  Remember: use `Reply All' to send replies to the list.
  Emacs-orgmode@gnu.org
  http://lists.gnu.org/mailman/listinfo/emacs-orgmode
 
 
 
 ___
 Emacs-orgmode mailing list
 Remember: use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode

The Latex wikibook
http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Wrapping_text_around_figures
suggests the wrapfigure package, but it also warns that some manual adjustments
is often required. Therefore, if this is implemented in the latex exporter it is
probably a good idea to provide options to include latex commands that will be
put before and after the \includegraphics command. See the example in the
section Tip for figures with too much white space of the wikibook where some
\vspace were used to adjust white space around the figure.

-- 
Darlan Cavalcante Moreira
darc...@gmail.com


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export of images

2009-10-02 Thread Nick Dokos
Darlan Cavalcante Moreira darc...@gmail.com wrote:

 At Fri, 2 Oct 2009 08:55:22 +0200,
 Carsten Dominik wrote:
  Do we need to implement a way so that text can be made to flow around  
  a figure, just as it is possible in HTML export?  What would be the  
  right LaTeX package to use for this purpose?
  
 The Latex wikibook
 http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Wrapping_text_around_figures
 suggests the wrapfigure package, but it also warns that some manual 
 adjustments
 is often required. Therefore, if this is implemented in the latex exporter it 
 is
 probably a good idea to provide options to include latex commands that will be
 put before and after the \includegraphics command. See the example in the
 section Tip for figures with too much white space of the wikibook where some
 \vspace were used to adjust white space around the figure.
 

... and the TeX FAQ seems to agree that wrapfig is probably the best option:

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=textflow

It also mentions some additional limitations.

Nick



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX export - customize own class

2009-09-29 Thread henry atting
On Di, Sep 29 2009, Nick Dokos wrote:

 henry atting nsmp...@online.de wrote:


 I pulled the newest git version, reloaded org.el  and tried to load the hook 
 with
 
 (add-hook 'org-mode-hook 'org-export-latex-final-hook)
 
 but when I am trying to export an org file to LaTeX I get an error message:
 
 run-hooks: Symbol's function definition is void:
 org-export-latex-final-hook
 

 org-export-latex-final-hook is just another hook, so you have to use it
 like this:

 (defun my-func ()
body
)

 (add-hook 'org-export-latex-final-hook (function my-func))

 Then your function will be called at the time that the hook is run:
 after the latex export is done.

I see, many thanks

henry

-- 
http://literaturlatenight.de


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX export - customize own class

2009-09-28 Thread henry atting
On Di, Sep 29 2009, Carsten Dominik wrote:

 On Sep 28, 2009, at 4:41 PM, henry atting wrote:

 I am trying to customize the orgmode export to the LaTeX class `play`
 A first level heading will then become the LaTeX \speaker{}, the text
 under this heading will become the text the speaker says. No problem
 so
 far, but some questions remain:

 - How can I prevent the export function from creating a titlepage
 and a
  table of contents?

#+TITLE:

 with no title specified will turn off the title.

#+OPTIONS: toc:nil

 will turn off the table of contents.

Ah, I did know it already but forgot it. I ordered `Improve Your Memory
in 600 Days' right away.

 - Most important: Every header is provided with a label. How can I
  supress this?

 You cannot, really.
 However, I have just added a new hook, org-export-latex-final-hook.
 You could use it to test if the class is play, and if yes, run through
 the buffer and remove all labels.

 - Finally, is it possible to automatically insert something *after*
  \begin{document}, something like \begin..\end{play}?

 You could also use the hook to do this.

I pulled the newest git version, reloaded org.el  and tried to load the hook 
with

(add-hook 'org-mode-hook 'org-export-latex-final-hook)

but when I am trying to export an org file to LaTeX I get an error message:

run-hooks: Symbol's function definition is void:
org-export-latex-final-hook

henry

-- 
http://literaturlatenight.de


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export - customize own class

2009-09-28 Thread Nick Dokos
henry atting nsmp...@online.de wrote:


 I pulled the newest git version, reloaded org.el  and tried to load the hook 
 with
 
 (add-hook 'org-mode-hook 'org-export-latex-final-hook)
 
 but when I am trying to export an org file to LaTeX I get an error message:
 
 run-hooks: Symbol's function definition is void:
 org-export-latex-final-hook
 

org-export-latex-final-hook is just another hook, so you have to use it
like this:

(defun my-func ()
   body
   )

(add-hook 'org-export-latex-final-hook (function my-func))

Then your function will be called at the time that the hook is run:
after the latex export is done.

HTH,
Nick



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX export of images

2009-09-23 Thread Sébastien Vauban



Hi Francesco,

Francesco Pizzolante wrote:
 1) Images in the middle of the text

 If I have the following example:

 ,
 | For this example, I will use this image [[myimage.png]] which is a very 
 good one.
 `

 Then, when exported, it produces the following LaTeX code:

 ,
 | For this example, I will the use this image
 | \centerline{\includegraphics{myimage}} which is a very good one.
 `

 Which produces weird layout when compiled to PDF.

 In this case, we should just generate \includegraphics{myimage} without the
 centerline command.

Given the output of the `\centerline' command, I guess that the inlining of an
image inside a line of text is not supported as is by Org. I can second such a
choice.

For such an effect, then, you still have a solution: simply write a chunk of
LaTeX code in your Org file.


 2) Images in floats

 In the case of floats, the correct generated code should be something like:

 \begin{figure}[htb]
 \centering
 \includegraphics{myimage}
 \label{LABEL}
 \caption{CAPTION}
 \end{figure}

 and not

 \begin{figure}[htb]
 \centerline{\includegraphics{myimage}}
 \label{LABEL}
 \caption{CAPTION}
 \end{figure}

 This can also be fixed quickly I think.

I'm not really aware of the `\centerline' command in LaTeX. It's true that, in
order to center, the most commonly usages are:

- the `\centering' command, to be put inside a group, or

- the `center' environment -- but this is generally considered as evil, as it
  adds unwanted spaces around.


 Now, the question is: is it correct to identify a float image thanks to its
 caption and label attributes? Can't we have a float image without label or
 caption?

That's right that I generally would also like to have all figures exported as
floats (or, at least, that such a decision would not just depend on the
presence or absence of a label/caption).

Best regards,
  Seb

-- 
Sébastien Vauban




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX export of images

2009-09-23 Thread Sébastien Vauban
Jeff Kowalczyk wrote:
 Sébastien Vauban wxhgmqzgw...@... writes:
 Francesco Pizzolante wrote:
 In this case, we should just generate \includegraphics{myimage} without
 the centerline command.

 Given the output of the `\centerline' command, I guess that the inlining of
 an image inside a line of text is not supported as is by Org. I can second
 such a choice.

 +1 for default to inline graphics. When using Org for How-To and project
 documentation delivered as PDF, floating screenshot-size images typically
 situate far from the descriptive text.

My point was mainly that, IMHO, floating or not should not be tied to the
presence or absence of caption/label.

Your problem with screenshots far away should be solved by putting the H
specifier to the float environment and loading the `float' package.


 I would prefer inline images by default (or option), and a file/subtree
 level option to use LaTeX floating layout.

That'd be a great way to be able to specify which type of inlining we want.
On a per file basis seems sufficient for me.

Best regards,
  Seb

-- 
Sébastien Vauban



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Export to LaTeX Beamer. [WAS: Re: [Orgmode] Re: LaTeX export bugs?]

2009-09-20 Thread Alan E. Davis
Hello:

I was happy to see a simple formula for exporting to Beamer.  The following
worked initially.  However, this initialization routine was able to run only
when org-latex had already been loaded.

On Sat, Jul 4, 2009 at 2:52 AM, Nick Dokos nicholas.do...@hp.com wrote:


 Here's the minimal.emacs - you'll need to adjust the load path for your
 setup:

 ,
 | (add-to-list 'load-path (expand-file-name
 ~/src/emacs/org/org-mode/lisp))
 | (add-to-list 'auto-mode-alist '(\\.\\(org\\|org_archive\\|txt\\)$ .
 org-mode))
 | (require 'org-install)
 | (global-set-key \C-cl 'org-store-link)
 | (global-set-key \C-ca 'org-agenda)
 | (global-set-key \C-cb 'org-iswitchb)
 | (setq org-log-done (quote time))
 | (setq org-log-into-drawer t)
 |
 | (load org-exp)
 | (load org-latex)
 |
 | (add-to-list 'org-export-latex-classes
 |  '(beamer
 |\\documentclass[11pt]{beamer}
 | \\usepackage[utf8]{inputenc}
 | \\usepackage[T1]{fontenc}
 | \\usepackage{hyperref}
 | \\usepackage{verbatim}
 | \\setbeameroption{show notes}
 | \\usetheme{Goettingen}
 | \\useoutertheme{infolines}
 |(\\begin{frame}\\frametitle{%s}\\begin{itemize}
 \\end{itemize}\\end{frame}
 | \\begin{frame}\\frametitle{%s}\\begin{itemize}
 \\end{itemize}\\end{frame})
 |(\\item{%s} . \\item*{%s})
 |)
 |  )
 `


Is it possible to put this inside of a hook (say, when org-latex was loaded,
or when the document class was beamer during the export process)?

Emacs just reports the following when this code is included into the init
file:

   Symbol's value as variable is void: org-export-latex-classes

After explicitly loading the library org-latex the code is executed and
the procedure works for exporting the example file---given that the latex
code must be cleaned up.

I haven't yet tried the following as a heading line:

   #+OPTIONS: toc:nil

Would that solve the problem you reported?

Alan




 and here's slides.org:

 ,
 | #+LaTeX_CLASS: beamer
 | #+TITLE: Example presentation
 | #+AUTHOR: Nick Dokos \\ $$\href{mailto:nicholas.do...@hp.com}{
 nicholas.do...@hp.com}$$
 | #+EMAIL: nicholas.do...@hp.com
 | #+OPTIONS: toc:nil H:2
 |
 | * Why
 | ** Reason 1.
 |Text explaining reason #1.
 | ** Reason 2.
 |... more explanations.
 | ** Reason 3.
 |Blah, blah, blah.
 |
 | ** Reason 4.
 |Why not?
 |
 | * What
 | ** First piece.
 | ** Second piece.
 | ** Third piece.
 | ** Fourth piece.
 `



Thank you for this helpful advice.

Alan Davis

You can know the name of a bird in all the languages of the world,  but when
you're finished, you'll know absolutely nothing whatever about the bird...
So let's look at the bird and see what it's doing---that's what counts.

   Richard Feynman
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: Export to LaTeX Beamer. [WAS: Re: [Orgmode] Re: LaTeX export bugs?]

2009-09-20 Thread Thomas S. Dye

On Sep 19, 2009, at 8:03 PM, Alan E. Davis wrote:


Hello:

I was happy to see a simple formula for exporting to Beamer.  The  
following worked initially.  However, this initialization routine  
was able to run only when org-latex had already been loaded.


On Sat, Jul 4, 2009 at 2:52 AM, Nick Dokos nicholas.do...@hp.com  
wrote:


Here's the minimal.emacs - you'll need to adjust the load path for  
your

setup:

,
| (add-to-list 'load-path (expand-file-name ~/src/emacs/org/org- 
mode/lisp))
| (add-to-list 'auto-mode-alist '(\\.\\(org\\|org_archive\\|txt\\) 
$ . org-mode))

| (require 'org-install)
| (global-set-key \C-cl 'org-store-link)
| (global-set-key \C-ca 'org-agenda)
| (global-set-key \C-cb 'org-iswitchb)
| (setq org-log-done (quote time))
| (setq org-log-into-drawer t)
|
| (load org-exp)
| (load org-latex)
|
| (add-to-list 'org-export-latex-classes
|  '(beamer
|\\documentclass[11pt]{beamer}
| \\usepackage[utf8]{inputenc}
| \\usepackage[T1]{fontenc}
| \\usepackage{hyperref}
| \\usepackage{verbatim}
| \\setbeameroption{show notes}
| \\usetheme{Goettingen}
| \\useoutertheme{infolines}
|(\\begin{frame}\\frametitle{%s}\\begin{itemize} \ 
\end{itemize}\\end{frame}
| \\begin{frame}\\frametitle{%s}\\begin{itemize} \ 
\end{itemize}\\end{frame})

|(\\item{%s} . \\item*{%s})
|)
|  )
`


Is it possible to put this inside of a hook (say, when org-latex was  
loaded, or when the document class was beamer during the export  
process)?


Emacs just reports the following when this code is included into the  
init file:


   Symbol's value as variable is void: org-export-latex-classes

After explicitly loading the library org-latex the code is  
executed and the procedure works for exporting the example file--- 
given that the latex code must be cleaned up.


I haven't yet tried the following as a heading line:

   #+OPTIONS: toc:nil

Would that solve the problem you reported?

Alan



and here's slides.org:

,
| #+LaTeX_CLASS: beamer
| #+TITLE: Example presentation
| #+AUTHOR: Nick Dokos \\ $$\href{mailto:nicholas.do...@hp.com}{nicholas.dokos@hp.com 
}$$

| #+EMAIL: nicholas.do...@hp.com
| #+OPTIONS: toc:nil H:2
|
| * Why
| ** Reason 1.
|Text explaining reason #1.
| ** Reason 2.
|... more explanations.
| ** Reason 3.
|Blah, blah, blah.
|
| ** Reason 4.
|Why not?
|
| * What
| ** First piece.
| ** Second piece.
| ** Third piece.
| ** Fourth piece.
`


Thank you for this helpful advice.

Alan Davis

You can know the name of a bird in all the languages of the world,   
but when you're finished, you'll know absolutely nothing whatever  
about the bird... So let's look at the bird and see what it's  
doing---that's what counts.


   Richard Feynman

___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Aloha Alan,

Here is a somewhat more elaborate set-up.

In customize org-export-latex-classes (or add to appropriate place  
in .emacs):


\documentclass{beamer}
\mode{{{beamermode}}}
{
 \usethemebeamertheme
 \usecolorthemebeamercolortheme
}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage{times}
\usepackage[T1]{fontenc}
\institutebeamerinstitute
\subjectbeamersubject

The macros here let me specify things that I like to change on a per- 
file basis.  So, in my org file there is this:


#+MACRO: BEAMERMODE presentation
#+MACRO: BEAMERTHEME Malmoe
#+MACRO: BEAMERCOLORTHEME tsdye
#+MACRO: BEAMERSUBJECT Evolutionary archaeology
#+MACRO: BEAMERINSTITUTE T. S. Dye \ Colleagues \\ B. P. Bishop Museum

I typically use sections and subsections in my talks (and the Malmoe  
theme displays them nicely within beamer).  So, I have this in  
customize org-export-latex-classes:


INS DEL Choice: Value Menu Heading:
numbered: \section{%s}
unnumbered): \section{%s}
INS DEL Choice: Value Menu Heading:
numbered: \subsection{%s}
unnumbered): \subsection{%s}
INS DEL Choice: Value Menu Environment:
Opening (numbered)  : \begin{frame} 
\frametitle{%s}

Closing (numbered)  : \end{frame}
Opening (unnumbered): \begin{frame} 
\frametitle{%s}

Closing (unnumbered): \end{frame}

I have the standard value for org-export-latex-low-levels in customize:
Org Export Latex Low Levels: Hide Value Value Menu Convert as itemized  
list


And then this in my .org file:

#+OPTIONS: H:3
#+OPTIONS: toc:nil

A typical slide show might look like this, in part:

* Introduction
** Evolution
*** Four Components of Evolutionary Processes
 Inheritance = Social learning
 

Re: [Orgmode] Re: LaTeX export bugs?

2009-09-18 Thread Carsten Dominik


On Sep 17, 2009, at 3:52 PM, Sébastien Vauban wrote:


Hi Carsten,

Francesco Pizzolante wrote:


indeed, it looks like I did make a mistake when recently trying to  
fix

this.

I believe I have got it right this time (current git version),  
please

verify.


It works perfectly now.


Not exactly the same problem, but very similar IMHO, there is (now  
or still?)
a problem of highlighting with `#+BEGIN' meta info not starting in  
column 0.


Just test with the following:

--8---cut here---start-8---
* 2009-09

#+BEGIN: clocktable :maxlevel 2 :scope file :block yesterday
Clock summary at [2009-09-16 Wed 17:27], for Tuesday, September 15,  
2009.


| L | Headline | Time   |  |
|---+--++--|
|   | *Total time* | *7:25* |  |
|---+--++--|
| 1 | 2009-09  | 7:25   |  |
| 2 | Some project || 7:25 |
#+END:
--8---cut here---end---8---


Hi Sebasien,

I am aware of this problem, but it is not so easy to solve.
The reason for this is that dynamic blocks are written by some
user function, which is not aware of any indentation to be applied.
So if I would allow indentation for the BEGIN line, I would end up
with

 #+BEGIN: clocktable
| L | Headline | Time   |  |
|---+--++--|
|   | *Total time* | *7:25* |  |
|---+--++--|
| 1 | 2009-09  | 7:25   |  |
| 2 | Some project || 7:25 |
 #+END:

Is that the desired outcome?
I guess I could enforce indentation of the block written by
the user function, but I am not sure if this might cause
problems in some cases.

I need to think more about this.

- Carsten

___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export bugs?

2009-09-18 Thread Carsten Dominik


On Sep 18, 2009, at 7:37 AM, Carsten Dominik wrote:



On Sep 17, 2009, at 3:52 PM, Sébastien Vauban wrote:


Hi Carsten,

Francesco Pizzolante wrote:


indeed, it looks like I did make a mistake when recently trying  
to fix

this.

I believe I have got it right this time (current git version),  
please

verify.


It works perfectly now.


Not exactly the same problem, but very similar IMHO, there is (now  
or still?)
a problem of highlighting with `#+BEGIN' meta info not starting in  
column 0.


Just test with the following:

--8---cut here---start-8---
* 2009-09

#+BEGIN: clocktable :maxlevel 2 :scope file :block yesterday
Clock summary at [2009-09-16 Wed 17:27], for Tuesday, September 15,  
2009.


| L | Headline | Time   |  |
|---+--++--|
|   | *Total time* | *7:25* |  |
|---+--++--|
| 1 | 2009-09  | 7:25   |  |
| 2 | Some project || 7:25 |
#+END:
--8---cut here---end---8---


Hi Sebasien,

I am aware of this problem, but it is not so easy to solve.
The reason for this is that dynamic blocks are written by some
user function, which is not aware of any indentation to be applied.
So if I would allow indentation for the BEGIN line, I would end up
with

#+BEGIN: clocktable
| L | Headline | Time   |  |
|---+--++--|
|   | *Total time* | *7:25* |  |
|---+--++--|
| 1 | 2009-09  | 7:25   |  |
| 2 | Some project || 7:25 |
#+END:

Is that the desired outcome?
I guess I could enforce indentation of the block written by
the user function, but I am not sure if this might cause
problems in some cases.

I need to think more about this.



I just *did* think more about it.  Indented dynamic blocks are now  
possible.


- Carsten

___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX export bugs?

2009-09-18 Thread Sébastien Vauban
Hi Carsten,

Carsten Dominik wrote:
 On Sep 18, 2009, at 7:37 AM, Carsten Dominik wrote:

 I am aware of this problem, but it is not so easy to solve. The reason for
 this is that dynamic blocks are written by some user function, which is not
 aware of any indentation to be applied. So if I would allow indentation for
 the BEGIN line, I would end up with

 #+BEGIN: clocktable
 | L | Headline | Time   |  |
 |---+--++--|
 |   | *Total time* | *7:25* |  |
 |---+--++--|
 | 1 | 2009-09  | 7:25   |  |
 | 2 | Some project || 7:25 |
 #+END:

 Is that the desired outcome?

Certainly not.


 I guess I could enforce indentation of the block written by the user
 function, but I am not sure if this might cause problems in some cases.

 I need to think more about this.

 I just *did* think more about it. Indented dynamic blocks are now possible.

Great!  Otherwise, leave it as it is...

Best regards,
  Seb

-- 
Sébastien Vauban



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX export bugs?

2009-09-17 Thread Sébastien Vauban
Hi Carsten,

Francesco Pizzolante wrote:

 indeed, it looks like I did make a mistake when recently trying to fix
 this.

 I believe I have got it right this time (current git version), please
 verify.

 It works perfectly now.

Not exactly the same problem, but very similar IMHO, there is (now or still?)
a problem of highlighting with `#+BEGIN' meta info not starting in column 0.

Just test with the following:

--8---cut here---start-8---
* 2009-09

#+BEGIN: clocktable :maxlevel 2 :scope file :block yesterday
Clock summary at [2009-09-16 Wed 17:27], for Tuesday, September 15, 2009.

| L | Headline | Time   |  |
|---+--++--|
|   | *Total time* | *7:25* |  |
|---+--++--|
| 1 | 2009-09  | 7:25   |  |
| 2 | Some project || 7:25 |
#+END:
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sébastien Vauban



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX export bugs?

2009-09-16 Thread Francesco Pizzolante
Hi Carsten,

 indeed, it looks like I did make a mistake when recently trying to fix  
 this.
 
 I believe I have got it right this time (current git version), please  
 verify.

It works perfectly now.

Thanks!

Francesco



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export bugs?

2009-09-15 Thread Francesco Pizzolante
Hi,

Carsten Dominik wrote:
 On Jul 1, 2009, at 10:21 PM, Sébastien Vauban wrote:
 Other things I've noticed:

 - Even with version 6.28, the `#+TBLNAME' tag must be located in column 0
 (at
  least, for the highlighting features to work)

 Fixed, thanks.

I'm using orgmode 6.30c and I still have this problem: if the #+TBLNAME: tag
is not located in column 0, the remote reference does not work.

Here's my little test:

#+TBLNAME: A
|   | T |
|---+---|
|   |  2.00 |
|   |  5.00 |
|---+---|
| # |  9.00 |
| ^ | total |
#+TBLFM: $2=vsum(@-...@-ii);%.2f

#+TBLNAME: price
   |T |PU | Total |
   |--+---+---|
   | 9.00 | 10.25 | 92.25 |
   |--+---+---|
#+TBLFM: @2$1=remote(A,$total);%.2f::@2$3=$1*$2;%.2f


Just add a few spaces at the first line and when you recompute the second
table you get a Can't find remote table A message.

Moreover, in a LaTeX environment, using the orgtbl minor mode, the
highlighting (font locking) does not work on the #+TBLNAME: line, even if
located in column 0.

Thanks.
F.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export bugs?

2009-09-15 Thread Carsten Dominik

Hi Francesco,

indeed, it looks like I did make a mistake when recently trying to fix  
this.


I believe I have got it right this time (current git version), please  
verify.


- Carsten

On Sep 15, 2009, at 1:11 PM, Francesco Pizzolante wrote:


Hi,

Carsten Dominik wrote:

On Jul 1, 2009, at 10:21 PM, Sébastien Vauban wrote:

Other things I've noticed:

- Even with version 6.28, the `#+TBLNAME' tag must be located in  
column 0

(at
least, for the highlighting features to work)


Fixed, thanks.


I'm using orgmode 6.30c and I still have this problem: if the # 
+TBLNAME: tag

is not located in column 0, the remote reference does not work.

Here's my little test:

#+TBLNAME: A
   |   | T |
   |---+---|
   |   |  2.00 |
   |   |  5.00 |
   |---+---|
   | # |  9.00 |
   | ^ | total |
   #+TBLFM: $2=vsum(@-...@-ii);%.2f

   #+TBLNAME: price
  |T |PU | Total |
  |--+---+---|
  | 9.00 | 10.25 | 92.25 |
  |--+---+---|
   #+TBLFM: @2$1=remote(A,$total);%.2f::@2$3=$1*$2;%.2f


Just add a few spaces at the first line and when you recompute the  
second

table you get a Can't find remote table A message.

Moreover, in a LaTeX environment, using the orgtbl minor mode, the
highlighting (font locking) does not work on the #+TBLNAME: line,  
even if

located in column 0.

Thanks.
F.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Latex export to documentclass beamer

2009-08-17 Thread Robert Goldman
Here's another challenge --- is there a good way to handle this in the
exporter?

If you use VERBATIM in a beamer frame, then you need to add the optional
argument fragile to the environment, like this:

\begin{frame}[fragile]

instead of just

\begin{frame}

I'd be surprised if there was a good method for this, but thought I'd ask...

best,
r


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Latex export to documentclass beamer

2009-08-17 Thread Nick Dokos
Robert Goldman rpgold...@sift.info wrote:

 Here's another challenge --- is there a good way to handle this in the
 exporter?
 
 If you use VERBATIM in a beamer frame, then you need to add the optional
 argument fragile to the environment, like this:
 
 \begin{frame}[fragile]
 
 instead of just
 
 \begin{frame}
 
 I'd be surprised if there was a good method for this, but thought I'd ask...
 

Have you tried adding it unconditionally in the org-export-latex-classes
alist?  I don't think it hurts to have it on by default (it costs a bit
of performance maybe, but it should not be noticeable.) OTOH, verbatim
is a can of worms: it should be avoided if at all possible. It cannot be
used in moving arguments (at all: see

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=verbwithin

for details.) - and what beamer does with it is a mystery to me - hence
the avoid at all costs statement.

HTH,
Nick


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Latex export to documentclass beamer

2009-08-17 Thread Robert Goldman
Nick Dokos wrote:
 Robert Goldman rpgold...@sift.info wrote:
 
 Here's another challenge --- is there a good way to handle this in the
 exporter?

 If you use VERBATIM in a beamer frame, then you need to add the optional
 argument fragile to the environment, like this:

 \begin{frame}[fragile]

 instead of just

 \begin{frame}

 I'd be surprised if there was a good method for this, but thought I'd ask...

 
 Have you tried adding it unconditionally in the org-export-latex-classes
 alist?  I don't think it hurts to have it on by default (it costs a bit
 of performance maybe, but it should not be noticeable.) OTOH, verbatim
 is a can of worms: it should be avoided if at all possible. It cannot be
 used in moving arguments (at all: see
 
 http://www.tex.ac.uk/cgi-bin/texfaq2html?label=verbwithin
 
 for details.) - and what beamer does with it is a mystery to me - hence
 the avoid at all costs statement.

I don't think the avoid at all costs is tenable when using beamer,
because of the need to insert code.

I have used alltt as well as verbatim, but it seems just as fragile.

I hope to provide a proposed beamer template sometime soon.

best,
Robert


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Latex export to documentclass beamer

2009-08-10 Thread Carsten Dominik


On Aug 9, 2009, at 5:45 PM, RC wrote:


Carsten Dominik carsten.dominik at gmail.com writes:




On Aug 9, 2009, at 3:05 PM, RC wrote:


Hi,
Following an earlier suggestion on the list:
http://thread.gmane.org/gmane.emacs.orgmode/15010/focus=15077

I added the following to my .emacs file:

(add-to-list 'org-export-latex-classes
  ...



For this line to be working, the variable must have been defined.
Either precede the code with
 (require 'org-latex)
or wrap it into
(eval-after-load org-latex '(add-to-list))
- Carsten


Thanks! That worked.

I had a a couple more questions about using latex-export.

1.
* Slide 5
\uncover2-
{appear from slide 2 on\\ }
\uncover3-4
{appears from 3 to slide 4\\ }
\uncover4{appears on slide 4\\ }
\uncover3-{appears from slide 3 on\\ }


You can warp this code in #+begin_latex ... #+end_latex



gets output as:

\begin{frame}\frametitle{Slide 5}
\label{sec-5}
\uncover2-
\{appear from slide 2 on\\ \}
\uncover3-4
\{appears from 3 to slide 4\\ \}
\uncover4\{appears on slide 4\\ \}
\uncover3-\{appears from slide 3 on\\ \}
\end{frame}

Is there a way to avoid { and } being output as \{ and \} ,  
respectively.


2. Is there a way to add an attribute to latex lists (itemize,  
enumerate,

description} so that:

* Slide 1
- x
- y
- z

gets output as:
\begin{itemize}[+-]
\item x
\item y
\item z
\end{itemize}


No.

- Carsten



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Latex export to documentclass beamer

2009-08-10 Thread William Henney
On Mon, Aug 10, 2009 at 6:46 AM, Carsten
Dominikcarsten.domi...@gmail.com wrote:
 2. Is there a way to add an attribute to latex lists (itemize, enumerate,
 description} so that:

 * Slide 1
 - x
 - y
 - z

 gets output as:
 \begin{itemize}[+-]
 \item x
 \item y
 \item z
 \end{itemize}

 No.

Although you could always add

\beamerdefaultoverlayspecification{+-}

to the preamble.

Cheers

Will

-- 

  Dr William Henney, Centro de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Latex export to documentclass beamer

2009-08-09 Thread RC
Carsten Dominik carsten.dominik at gmail.com writes:

 
 
 On Aug 9, 2009, at 3:05 PM, RC wrote:
 
  Hi,
  Following an earlier suggestion on the list:
  http://thread.gmane.org/gmane.emacs.orgmode/15010/focus=15077
 
  I added the following to my .emacs file:
 
  (add-to-list 'org-export-latex-classes
 ...

 For this line to be working, the variable must have been defined.
 Either precede the code with
   (require 'org-latex)
 or wrap it into
 (eval-after-load org-latex '(add-to-list))
 - Carsten

Thanks! That worked.

I had a a couple more questions about using latex-export.

1. 
* Slide 5
\uncover2-
{appear from slide 2 on\\ }
\uncover3-4
{appears from 3 to slide 4\\ }
\uncover4{appears on slide 4\\ }
\uncover3-{appears from slide 3 on\\ }

gets output as:

\begin{frame}\frametitle{Slide 5}
\label{sec-5}
\uncover2-
\{appear from slide 2 on\\ \}
\uncover3-4
\{appears from 3 to slide 4\\ \}
\uncover4\{appears on slide 4\\ \}
\uncover3-\{appears from slide 3 on\\ \}
\end{frame}

Is there a way to avoid { and } being output as \{ and \} , respectively.

2. Is there a way to add an attribute to latex lists (itemize, enumerate,
description} so that:

* Slide 1
 - x
 - y
 - z

gets output as:
\begin{itemize}[+-]
\item x
\item y
\item z
\end{itemize}

Thanks again for the help, and the invaluable org-mode.

RC



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX export bug

2009-07-31 Thread Dan Griswold
Bastien bastiengue...@googlemail.com writes:

 I can also reproduce this, I will fix it by sunday.

Excellent! Thank you!

Dan

-- 
 ___
/\  \
\_| Dan Griswold|
  | dgris...@rochester.rr.com   |
  |   __|_
   \_//


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX export bug

2009-07-30 Thread Dan Griswold
Bernt Hansen be...@norang.ca writes:

 Dan Griswold dgris...@rochester.rr.com writes:

 Note that the top level headings (A Heading and Another Heading)
 are not exported as \section, but with the asterisks they have in the
 org file

... snip ...

 Can any of you reproduce this?

 Hi Dan,

 Yes I can reproduce this too.

That's good to know. It's not my configuration, then.

Not sure, but I would guess that the problem lies in the function
org-export-as-latex in org-export-latex.el, probably in the section that
begins with the comment export the content of headlines (line 498).

But try as I might, I can't entirely grok this, so I don't know how else
to help track down the cause of the bug.

Dan

-- 
 ___
/\  \
\_| Dan Griswold|
  | dgris...@rochester.rr.com   |
  |   __|_
   \_//


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX export bug

2009-07-29 Thread Bernt Hansen
Dan Griswold dgris...@rochester.rr.com writes:

 Note that the top level headings (A Heading and Another Heading) are
 not exported as \section, but with the asterisks they have in the org
 file:

 ,
 | ** A Heading
 | \begin{itemize}
 | 
 |   ... snip ...
 | 
 | \end{itemize}
 | ** Another heading
 `

 Exporting the whole file does what it's supposed to do: export the
 headlines as \section and \subsection.

 Can any of you reproduce this?

Hi Dan,

Yes I can reproduce this too.
Org-mode version 6.28trans
GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of
2008-11-09 on raven, modified by Debian

-Bernt


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX export bugs?

2009-07-06 Thread Sébastien Vauban
Hi all,

Carsten Dominik wrote:
 Sébastien Vauban wrote:
 Carsten Dominik wrote:
 Sébastien Vauban wrote:
 [This is not working...]

--8---cut here---start-8---
#+LaTeX: \begin{framed}
#+ATTR_LaTeX: align=lrrr
| Code  | \euro{} |  \% | \euro{} |
|---+-+-+-|
| GSM   | | |0.00 |
| Internet  |  168.45 | 100 |  168.45 |
| Matériel  |  295.99 | 100 |  295.99 |
| Publicité |  214.25 |  33 |   70.70 |
| Autres| | |0.00 |
|---+-+-+-|
| Total | | |  535.14 |
#+TBLFM: $4=$2*$3/100;%.2f::@7$4=vsum(@-...@-ii)
#+LaTeX: \end{framed}
--8---cut here---end---8---

 Am I misunderstanding section 12.7.2 or is this a feature?

 This does not work. What is happening here is that during LaTeX export,
 these begin/end lines are inserted into the buffer. Then the LaTeX exporter
 marks the entire content of this environment as something that should be
 exported literally to LaTeX, this is why you can write

 \begin{equation}
 a=b
 \end{equation}

 and it will all be exported literally to LaTeX.

 The fact that the table is transformed into a LaTeX table at all is actually
 a bug which I will fix.

I'm not sure I understand what's the impact of your last sentence. But, maybe,
I don't have too...

Related to this:

 Now, more important question, one of the few that's not answered from my
 previous post: how can I shade or frame a table? For me, inserting #+LaTeX
 tags is different from inserting #+BEGIN_LaTeX and #+END_LaTeX tags: the
 first one should have no impact on the rest of the text.

Rephrasing my question, asking it again in other words (showing you I did not
follow correctly): for me,

--8---cut here---start-8---
#+BEGIN_framed
XXX
#+END_framed
--8---cut here---end---8---

is equivalent to:

--8---cut here---start-8---
#+LaTeX: \begin{framed}
XXX
#+LaTeX: \end{framed}
--8---cut here---end---8---

If not, that's not what I understand from reading section 12.7.2 about the
quoting of LaTeX code?  Though, it seems (seemed) clear...


 So there is not really a standard way to do what you want.

 However, you could take a look as Chris Gray's contributes package
 org-special-blocks.el

http://orgmode.org/worg/org-contrib/org-special-blocks.php

 which was made just for this use case.

Excellent. Tested. Work perfectly, except for:


 - Even with version 6.28, the `#+TBLNAME' tag must be located in column 0
 (at least, for the highlighting features to work)

 Fixed, thanks.

Same problem with the Org-special-blocks constructs: they need to be declared
in column 0; otherwise, they're just ignored...

A detail, though: putting my table in a `framed' block makes the highlighting
of the keywords such as TBLNAME and TBLFM disappear...

Many thanks for all the help you all provide us with!

Best regards,
  Seb

PS- Hoping desperately Org-mode will win!

-- 
Sébastien Vauban



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX export bugs?

2009-07-03 Thread Sébastien Vauban
Hi Carsten,

Carsten Dominik wrote:
 Sébastien Vauban wrote:

  - If you have a level 3 item under a level 1 item, the level 3 doesn't get
exported to LaTeX. I know this is not a normal situation, but it happens
when restructuring some text, and you loose it in the exported view...

 Yes, the parser currently requires the structure to be consistent and does
 not fail gracefully if not.

OK.


- Table with formulas and environment /framed/ :

  The following table will be framed, but TBL formulas do not work
  anymore.

#+ATTR_LaTeX: align=lrrr
#+LaTeX: \begin{framed}
| Code  | \euro{} |  \% | \euro{} |
|---+-+-+-|
| GSM   | | |0.00 |
| Internet  |  168.45 | 100 |  168.45 |
| Matériel  |  295.99 | 100 |  295.99 |
| Publicité |  214.25 |  33 |   70.70 |
| Autres| | |0.00 |
|---+-+-+-|
| Total | | |  535.14 |
#+LaTeX: \end{framed}
#+TBLFM: $4=$2*$3/100;%.2f::@7$4=vsum(@-...@-ii)

  Swapping these two last lines gives LaTeX errors... What's the
  solution for having both: an environment around the table and formulas
  that work?

 This is a hard problem.  It is on my list, but will not be fixed soon.

I had not seen this reply yet, when re-sending my question yesterday night.
I've got the solution from Chris to test...


  Why do I have to escape the sign symbol as soon as I put LaTeX
  commands (and not BEGIN..END_LaTeX) near it?

 I do not understand what you mean here.

I don't understand the details of the export process. For me, if I have such a
table:

| Item |  % |
|--+|
| Sample 1 | 20 |

and I want it framed, adding `#+LaTeX: \begin{framed}' and `#+LaTeX:
\end{framed}' should be transparent for the Org - LaTeX conversion process.

It is not: as soon as I do such a thing, I need to escape the `%' sign:

| Item | \% |
|--+|
| Sample 1 | 20 |

For me, the `%' should be escaped independently of whether I add or not such a
LaTeX tag.


- Hyperlink to other sections: see [[To be referenced]]. Looking in the
  produced LaTeX code, it always link to the current section instead!

 Have not yet looked into this. Use IDs or custom IDs to links to sections,
 that is much better.

OK.


- Quotes are sometimes exported in a weird /fashion/ : see Industriels,
  et commerçants. And compare with the quotes in the next sample
  (Industriels et commerçants).

 Fixed.

Thanks that *you* fixed it ;-)


  See as well that /fashion/ is not in italic above.

 It is for me

I guess you talk to someone else? ;-)


  Apparently because of the special non-breaking space following the
  second slash...

 Looks like the non-breaking space did not make it through
 the mailing process.  What exactly are you using?

Here is one non-breaking space: ` ', and here is what Emacs tells me about it
(when `C-u C-x ='):

--8---cut here---start-8---
character:   (160, #o240, #xa0)
preferred charset: unicode (Unicode (ISO10646))
   code point: 0xA0
   syntax: .which means: punctuation
 category: .:Base, b:Arabic, j:Japanese, l:Latin
  buffer code: #xC2 #xA0
file code: #xC2 #xA0 (encoded by coding system utf-8-emacs-unix)
  display: by display table entry [?øŽ€‚·] (see below)

The display table entry is displayed by these fonts (glyph codes):
øŽ€‚·: -- no font --
 face: `bold'

Character code properties: customize what to show
  name: NO-BREAK SPACE
  old-name: NON-BREAKING SPACE
  general-category: Zs (Separator, Space)
  decomposition: (noBreak 32) (noBreak ' ')

There are text properties here:
  fontifiedt
--8---cut here---end---8---

I insert them when I have a colon (for example) preceded by a space: that
space is automagically converted to non-breaking one, thanks to the following
code in my `.emacs' file:


--8---cut here---start-8---
(defun my-insert-colon ()
  (interactive)
  (if (eq (char-before) ?\ ) ; normal space
  (progn
(backward-delete-char 1)
(if (equal mode-name PDFLaTeX)
(insert ~:) ; for LaTeX-only
  (insert  :))) ; non-breaking space
(insert :)))

(defun my-double-keys ()
  Specific keys.
  (interactive)
  (local-set-key : 'my-insert-colon))

(add-hook 'text-mode-hook 'my-double-keys)
(add-hook 'message-mode-hook 'my-double-keys)
--8---cut here---end---8---


  BTW, a possibility would be to translate the non-breaking space to
  its LaTeX equivalent syntax (the tilde sign).

If you don't mind, this is on my wishlist of Org-mode features... You see my
Emacs code handles it when I write LaTeX myself, something I wanna avoid like
pest now 

[Orgmode] Re: LaTeX export bugs?

2009-07-03 Thread Sébastien Vauban
Hi Nick,

Nick Dokos wrote:
 Sebastien Vauban wrote:

  BTW, any solution for exporting to a Beamer presentation? I'd be very
  very very interested by anything in that direction. That's the last piece
  of the whole puzzle, IMHO.
 

 I did a beamer presentation in org-mode last month (1 hour, about 20 slides).
 Here is a simplified version (I'll talk about some problems at the end).

 o org-export-latex-classes is augmented with a beamer element as follows:

 ,
 | (add-to-list 'org-export-latex-classes
 |'(beamer
 |  
 \\documentclass[11pt]{beamer}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{hyperref}\n\\usepackage{verbatim}\n\\setbeameroption{show
  notes}\n\\usetheme{Goettingen}\n\\useoutertheme{infolines}
 |  (\\begin{frame}\\frametitle{%s}\\begin{itemize} 
 \\end{itemize}\\end{frame}
 |   \\begin{frame}\\frametitle{%s}\\begin{itemize} 
 \\end{itemize}\\end{frame})
 |  (\\item{%s} . \\item*{%s})
 |  (\\end{itemize}\\note{ })))
 `

Excellent idea...


 o Here is an input file:

 ,
 | #+LaTeX_CLASS: beamer
 | #+TITLE: Example presentation
 | #+AUTHOR: Nick Dokos \\ 
 $$\href{mailto:nicholas.do...@hp.com}{nicholas.dokos@hp.com}$$
 | #+EMAIL: nicholas.do...@hp.com
 | 
 | * Why
 | ** Reason 1.
 |Text explaining reason 1.
 | ** Reason 2.
 |... more explanations.
 | ** Reason 3.
 |Blah, blah, blah.
 |  
 | ** Reason 4.
 |Why not?
 | 
 | * What
 | ** First piece.
 | ** Second piece.
 | ** Third piece.
 | ** Fourth piece.
 `

 o Export it to latex (and zap the TOC - see below):

Weird. Having done the above `add-to-list' in Emacs (with `C-x C-e'), I got a
different exported file than yours. But really different:

--8---cut here---start-8---
% Created 2009-07-03 Fri 10:32
\documentclass[11pt]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage{verbatim}
\setbeameroption{show notes}
\usetheme{Goettingen}
\useoutertheme{infolines}


\title{Example presentation}
\author{Nick Dokos \\ 
$$\href{mailto:nicholas.do...@hp.com}{nicholas.dokos@hp.com}$$}
\date{03 July 2009}

\begin{document}

\maketitle

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

\begin{frame}\frametitle{Why}\begin{itemize}
\label{sec-1}

\end{itemize}\end{frame}
\begin{frame}\frametitle{What}\begin{itemize}
\label{sec-2}

\end{itemize}\end{frame}

\end{document}
--8---cut here---end---8---

There is no text, in fact...
Don't understand why...


 Some notes:

 o Level 1 headlines become slide titles.

 o Level 2 headlines become items in the slide and the text under the level
   2 headlines ends up as text in the item.

 o Level 3 headlines (not shown in the sample document) were supposed to
   become notes, but this obviously will not work this way. I don't know
   how to make it work. In the end, I edited the tex file by hand in
   order to get the notes right.

 o Moreover (and I think this is a bug in the latex exporter), I had to
   rearrange the notes by hand: they ended up in the wrong slides.
   I have had zero time to chase this however, so I am not really sure
   why this happened.

 o There was a problem with the table of contents (it's empty and it pushes
   the title of the first slide down), so I manually zapped it from
   the tex file.

 o Latex had some peculiar objections to the labels and I did not care
   about them, so I preprocessed them out of existence in the tex file.

 After a little practice, I could edit the tex file to take care of all the
 problems in about 5 minutes. Even so, after getting the bulk of the contents
 of the presentation done, I did a final production of the tex file and did
 the final touchups on that. One of these days, I'll have to go back and
 figure out some of the problems. For now, this zeroth approximation to a
 solution will have to suffice.

I think as well we can live with such minor troubles for the moment. And still
take advantage of Org...

Though, I have a bigger problem getting to there.

Best regards,
  Seb

-- 
Sébastien Vauban



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export bugs?

2009-07-03 Thread Nick Dokos
=?utf-8?Q?S=C3=A9bastien_Vauban?= wxhgmqzgw...@spammotel.com wrote:

 
 Weird. Having done the above `add-to-list' in Emacs (with `C-x C-e'),
  I got a different exported file than yours. But really different:
 
 --8---cut here---start-8---
 ...
 --8---cut here---end---8---
 
 There is no text, in fact...
 Don't understand why...
 
 

I don't understand why either, but it may be some setting in my setup
or your setup that leads to the different behavior. In case it matters,
I use the following versions:

GNU Emacs 23.0.93.1 (i686-pc-linux-gnu, GTK+ Version 2.12.9) of 2009-05-11 on 
gamaville.dokosmarshall.org
Org-mode version 6.28trans - git latest (more or less).

Here is an even more simplified version, using a variation of Bernt
Hansen's minimal .emacs. This version of slides.org takes care of the
zapping of the TOC at the org level, and the beamer section in
minimal.emacs gets rid of the third level Notes headlines (which cannot
work this way, in any case). I checked with

   emacs -Q -l minimal.emacs slides.org

exported to latex, and ran the latex file through pdflatex a couple of
times. The resulting PDF file seems to work for me. Can you try it out?

Thanks,
Nick

Here's the minimal.emacs - you'll need to adjust the load path for your
setup:

,
| (add-to-list 'load-path (expand-file-name ~/src/emacs/org/org-mode/lisp))
| (add-to-list 'auto-mode-alist '(\\.\\(org\\|org_archive\\|txt\\)$ . 
org-mode))
| (require 'org-install)
| (global-set-key \C-cl 'org-store-link)
| (global-set-key \C-ca 'org-agenda)
| (global-set-key \C-cb 'org-iswitchb)
| (setq org-log-done (quote time))
| (setq org-log-into-drawer t)
| 
| (load org-exp)
| (load org-latex)
| 
| (add-to-list 'org-export-latex-classes
|  '(beamer
|\\documentclass[11pt]{beamer}
| \\usepackage[utf8]{inputenc}
| \\usepackage[T1]{fontenc}
| \\usepackage{hyperref}
| \\usepackage{verbatim}
| \\setbeameroption{show notes}
| \\usetheme{Goettingen}
| \\useoutertheme{infolines}
|(\\begin{frame}\\frametitle{%s}\\begin{itemize} 
\\end{itemize}\\end{frame}
| \\begin{frame}\\frametitle{%s}\\begin{itemize} 
\\end{itemize}\\end{frame})
|(\\item{%s} . \\item*{%s})
|)
|  )
`

and here's slides.org:

,
| #+LaTeX_CLASS: beamer
| #+TITLE: Example presentation
| #+AUTHOR: Nick Dokos \\ 
$$\href{mailto:nicholas.do...@hp.com}{nicholas.dokos@hp.com}$$
| #+EMAIL: nicholas.do...@hp.com
| #+OPTIONS: toc:nil H:2
| 
| * Why
| ** Reason 1.
|Text explaining reason #1.
| ** Reason 2.
|... more explanations.
| ** Reason 3.
|Blah, blah, blah.
|  
| ** Reason 4.
|Why not?
| 
| * What
| ** First piece.
| ** Second piece.
| ** Third piece.
| ** Fourth piece.
`


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export bugs?

2009-07-02 Thread Carsten Dominik


On Jul 1, 2009, at 10:21 PM, Sébastien Vauban wrote:

Other things I've noticed:

- Even with version 6.28, the `#+TBLNAME' tag must be located in  
column 0 (at

 least, for the highlighting features to work)


Fixed, thanks.



- Remote references to other tables are great, but they only work with
 absolute references, not with named cells.


They actually do work fine.  A call like remote(mytbl,$name) will work
in this table

| _ | name |
|   | value |

- Carsten


On the wishlist (easy to
 say ;-)), I image it'd be utmost useful to be able to name a cell  
and reuse

 its name in a remote ref.

Thanks for any commentary on the above...

Thank you very much Carsten, Bastien and Co...
 Seb

--
Sébastien Vauban



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX export bugs?

2009-07-02 Thread Sébastien Vauban
Hi Carsten,

Carsten Dominik wrote:
 Sébastien Vauban wrote:
 Other things I've noticed:

 - Even with version 6.28, the `#+TBLNAME' tag must be located in column 0
 (at least, for the highlighting features to work)

 Fixed, thanks.

Euh, no, *I* am supposed to answer: Fixed, thanks, and I'm doing it... ;-)


 - Remote references to other tables are great, but they only work with
  absolute references, not with named cells.

 They actually do work fine.  A call like remote(mytbl,$name) will work
 in this table

 | _ | name |
 |   | value |

OK. I did not understand from the doc (section 3.5.1) that I had to prefix the
name of the cell with $:

   REF is an absolute field [...] as described above.

I admit that, knowing it, I understand the above text better. Maybe is such
an example missing?

Now, more important question, one of the few that's not answered from my
previous post: how can I shade or frame a table? For me, inserting #+LaTeX
tags is different from inserting #+BEGIN_LaTeX and #+END_LaTeX tags: the first
one should have no impact on the rest of the text.

Though, it isn't as you can see with my following example:

--8---cut here---start-8---
#+LaTeX: \begin{framed}
#+ATTR_LaTeX: align=lrrr
| Code  | \euro{} |  \% | \euro{} |
|---+-+-+-|
| GSM   | | |0.00 |
| Internet  |  168.45 | 100 |  168.45 |
| Matériel  |  295.99 | 100 |  295.99 |
| Publicité |  214.25 |  33 |   70.70 |
| Autres| | |0.00 |
|---+-+-+-|
| Total | | |  535.14 |
#+TBLFM: $4=$2*$3/100;%.2f::@7$4=vsum(@-...@-ii)
#+LaTeX: \end{framed}
--8---cut here---end---8---

Am I misunderstanding section 12.7.2 or is this a feature?

Best regards,
  Seb

-- 
Sébastien Vauban



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export bugs?

2009-07-02 Thread Carsten Dominik


On Jul 2, 2009, at 10:40 PM, Sébastien Vauban wrote:


Hi Carsten,

Carsten Dominik wrote:

Sébastien Vauban wrote:

Other things I've noticed:

- Even with version 6.28, the `#+TBLNAME' tag must be located in  
column 0

(at least, for the highlighting features to work)


Fixed, thanks.


Euh, no, *I* am supposed to answer: Fixed, thanks, and I'm doing  
it... ;-)


The thanks is short for thanks for your report/idea :-)




- Remote references to other tables are great, but they only work  
with

absolute references, not with named cells.


They actually do work fine.  A call like remote(mytbl,$name) will  
work

in this table

| _ | name |
|   | value |


OK. I did not understand from the doc (section 3.5.1) that I had to  
prefix the

name of the cell with $:

  REF is an absolute field [...] as described above.

I admit that, knowing it, I understand the above text better. Maybe  
is such

an example missing?


Fixed, thanks.



Now, more important question, one of the few that's not answered  
from my
previous post: how can I shade or frame a table? For me, inserting # 
+LaTeX
tags is different from inserting #+BEGIN_LaTeX and #+END_LaTeX tags:  
the first

one should have no impact on the rest of the text.

Though, it isn't as you can see with my following example:

--8---cut here---start-8---
#+LaTeX: \begin{framed}
#+ATTR_LaTeX: align=lrrr
| Code  | \euro{} |  \% | \euro{} |
|---+-+-+-|
| GSM   | | |0.00 |
| Internet  |  168.45 | 100 |  168.45 |
| Matériel  |  295.99 | 100 |  295.99 |
| Publicité |  214.25 |  33 |   70.70 |
| Autres| | |0.00 |
|---+-+-+-|
| Total | | |  535.14 |
#+TBLFM: $4=$2*$3/100;%.2f::@7$4=vsum(@-...@-ii)
#+LaTeX: \end{framed}
--8---cut here---end---8---

Am I misunderstanding section 12.7.2 or is this a feature?


This does not work.  What is happening here is that during
LaTeX export, these begin/end lines are inserted into the buffer.
Then the LaTeX exporter marks the entire content of this environment
as something that should be exported literally to LaTeX, this is
why you can write

\begin{equation}
a=b
\end{equation}

and it will all be exported literally to LaTeX.

The fact that the table is transformed into a LaTeX table at
all is actually a bug which I will fix.

So there is not really a standard way to do what you want.

However, you could take a look as Chris Gray's contributes package
org-special-blocks.el

   http://orgmode.org/worg/org-contrib/org-special-blocks.php

which was made just for this use case.

Another workaround (hack, really) would be

#+LATEX_HEADER: \def\noop{}

\noop\begin{framed}
...
\noop\end{framed}

This will trick Org-mode by not having the \begin macro at
the beginning of a line, so it will not protect the content
of the environment.  Dirty, but works.

HTH

- Carsten



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX export bugs?

2009-07-01 Thread Sébastien Vauban
Hi all,

 To make things clear, I love Org-mode (yes, I voted) and its LaTeX export.
 More than you can imagine: I now look for avoiding writing any LaTeX document,
 and have the export do all the work for me...

 BTW, any solution for exporting to a Beamer presentation?  I'd be very very
 very interested by anything in that direction. That's the last piece of the
 whole puzzle, IMHO.

 Though, working more and more in that direction (Org-mode - LaTeX), I've seen
 a couple of weird things that I've compiled into an ECM, for ease of use:

 * Org

   - If you have a level 3 item under a level 1 item, the level 3 doesn't get
 exported to LaTeX. I know this is not a normal situation, but it happens
 when restructuring some text, and you loose it in the exported view...

 * THIS SECTION WILL DISAPPEAR!!

   This text is not exported. Though, I'm not always aware of it, when
   sections are long (spreading over more than one screen page)...

 *** Level 2 -- is there a level 3 above?

 - Table with formulas and environment /framed/ :

   The following table will be framed, but TBL formulas do not work
   anymore.

 #+ATTR_LaTeX: align=lrrr
 #+LaTeX: \begin{framed}
 | Code  | \euro{} |  \% | \euro{} |
 |---+-+-+-|
 | GSM   | | |0.00 |
 | Internet  |  168.45 | 100 |  168.45 |
 | Matériel  |  295.99 | 100 |  295.99 |
 | Publicité |  214.25 |  33 |   70.70 |
 | Autres| | |0.00 |
 |---+-+-+-|
 | Total | | |  535.14 |
 #+LaTeX: \end{framed}
 #+TBLFM: $4=$2*$3/100;%.2f::@7$4=vsum(@-...@-ii)

   Swapping these two last lines gives LaTeX errors... What's the solution
   for having both: an environment around the table and formulas that work?

   Why do I have to escape the sign symbol as soon as I put LaTeX commands
   (and not BEGIN..END_LaTeX) near it?

 - Hyperlink to other sections: see [[To be referenced]]. Looking in the
   produced LaTeX code, it always link to the current section instead!

 - Quotes are sometimes exported in a weird /fashion/ : see Industriels,
   et commerçants. And compare with the quotes in the next sample
   (Industriels et commerçants).

   See as well that /fashion/ is not in italic above. Apparently because of
   the special non-breaking space following the second slash... BTW, a
   possibility would be to translate the non-breaking space to its LaTeX
   equivalent syntax (the tilde sign).

 * To be referenced

   This should be the landing point for the hyperreference above.

 Once again, thanks to all of you that provide us with those wonderful
 features...

Anybody commenting on the above?

Other things I've noticed:

- Even with version 6.28, the `#+TBLNAME' tag must be located in column 0 (at
  least, for the highlighting features to work)

- Remote references to other tables are great, but they only work with
  absolute references, not with named cells. On the wishlist (easy to
  say ;-)), I image it'd be utmost useful to be able to name a cell and reuse
  its name in a remote ref.

Thanks for any commentary on the above...

Thank you very much Carsten, Bastien and Co...
  Seb

-- 
Sébastien Vauban



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX Export

2009-02-12 Thread Rasmus Pank Roulund
Carsten Dominik domi...@science.uva.nl writes:

 Some time ago I added a new matcher $1 for single
 charactersbetween dollars like in this case.  People who
 havecustomized this option unfortunately do not get to see it.
That was probably the problem. It works a lot better now! Thanks. 


 That said, Giovanni's proposal to use \(\) is excellentadvice, at least
 in cases where using $..$ causes trouble.- Carsten

Acctually, at first I used \(...\) but at that time Org had a harder
time picking up \(...\) than $...$ which caused a lot of \($...$\). I
have not checked whether it works better now.

Thanks,
Rasmus



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX Export $s

2009-02-11 Thread Giovanni Ridolfi
--- Mar 10/2/09, Rasmus Pank Roulund rasmus.p...@gmail.com ha scritto:
 Sorry for the late reply. This is regarind a bug in LaTeX
 export.
 The trouble seems to happen when autofill is used. It
 might be caused by something else. I am not sure. The thing
 is
 that Org sometimes misintpretate $ as the currency symbolar
 rather than math as in LaTeX-lingu. IMO the use
 of $ as a
 currency symbol should be optional.
hi, Rasmus,

you should use \(  \) for a well-exported math environment 
and not $  ;-)

as stated in the maual:

11.3 LaTeX fragments

Text within the usual LaTeX math delimiters.  To avoid conflicts
 with currency specifications, single `$' characters are only
 recognized as math delimiters 
 if the enclosed text contains at most two line breaks, 
 is directly attached to the `$' characters
 with no whitespace in between, 
 and if the closing `$' is followed
 by whitespace, punctuation or a dash.  For the other delimiters,
 there is no such restriction, so when in doubt, use `\(...\)' as
 inline math delimiters.


Giovanni


  Passa a Yahoo! Mail.

La webmail che ti offre GRATIS spazio illimitato, 
antispam e messenger integrato.
http://it.mail..yahoo.com/  



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX Export

2009-02-11 Thread Carsten Dominik


On Feb 10, 2009, at 9:46 PM, Rasmus Pank Roulund wrote:


Hello,
Sorry for the late reply. This is regarind a bug in LaTeX export.
The trouble seems to happen when autofill is used. It
might be caused by something else. I am not sure. The thing is
that Org sometimes misintpretate $ as the currency symbolar
rather than math as in LaTeX-lingu. IMO the use of $ as a
currency symbol should be optional.

Here is an example of the error:

Org source:

  - Funktioner findes ved at sætte funktionen lige en given konstant
$k$. Dermed bestemmes indifferentfunktion. Det ses nemt at
$u(x_1, x_2)=k$.

LaTeX export:

  \item Funktioner findes ved at sætte funktionen lige en given  
konstant

\$k\$. Dermed bestemmes indifferentfunktion. Det ses nemt at
$u(x_1, x_2)=k$.

I have pulled the newest revision of Org. The version is 6.22b.


Please remove your customization of org-format-latex-options.
You can do this by doing

M-x customize-variable RET org-format-latex-options RET

and then clicking on Erase customizations, then
Set for current session, then Save for future sessions.

After that, re-make any customizations you want in that variable.

Some time ago I added a new matcher $1 for single characters
between dollars like in this case.  People who have
customized this option unfortunately do not get to see it.

That said, Giovanni's proposal to use \(\) is excellent
advice, at least in cases where using $..$ causes trouble.

- Carsten

___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX Export

2009-02-11 Thread Bernt Hansen
Carsten Dominik domi...@science.uva.nl writes:

 M-x customize-variable RET org-format-latex-options RET

 and then clicking on Erase customizations, then
 Set for current session, then Save for future sessions.

On my version of Emacs

GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of
2008-11-09 on raven, modified by Debian

if I click on [Save for future sessions] it also sets the current
session data.  I don't need to click on both.

I used to do that but decided one day to figure out if that was really
necessary (since I was messing with lots of configuration variables
through the customize interface and clicking on both buttons was bugging
me :) )

HTH,
-Bernt


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX Export

2009-02-11 Thread Carsten Dominik


On Feb 11, 2009, at 4:56 PM, Bernt Hansen wrote:


Carsten Dominik domi...@science.uva.nl writes:


M-x customize-variable RET org-format-latex-options RET

and then clicking on Erase customizations, then
Set for current session, then Save for future sessions.


On my version of Emacs

GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of
2008-11-09 on raven, modified by Debian

if I click on [Save for future sessions] it also sets the current
session data.  I don't need to click on both.

I used to do that but decided one day to figure out if that was really
necessary (since I was messing with lots of configuration variables
through the customize interface and clicking on both buttons was  
bugging

me :) )


Indeed, this is good to know.

- Carsten



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX Export

2009-02-10 Thread Rasmus Pank Roulund
Hello,
Sorry for the late reply. This is regarind a bug in LaTeX export.
The trouble seems to happen when autofill is used. It
might be caused by something else. I am not sure. The thing is
that Org sometimes misintpretate $ as the currency symbolar
rather than math as in LaTeX-lingu. IMO the use of $ as a
currency symbol should be optional.

Here is an example of the error:

Org source: 

   - Funktioner findes ved at sætte funktionen lige en given konstant
 $k$. Dermed bestemmes indifferentfunktion. Det ses nemt at
 $u(x_1, x_2)=k$.

LaTeX export: 

   \item Funktioner findes ved at sætte funktionen lige en given konstant
 \$k\$. Dermed bestemmes indifferentfunktion. Det ses nemt at
 $u(x_1, x_2)=k$.

I have pulled the newest revision of Org. The version is 6.22b.

Thanks,
Rasmus



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Latex export error in tables

2009-02-10 Thread Flávio de Souza
Manish mailtomanish.sha...@gmail.com writes:

 On Mon, Feb 9, 2009 at 6:10 PM, Flávio wrote:
 [snip (44 lines)]

 This is not a utf-8 encoding problem. When I generate a tex file with org, I
 change manually from \usepackage[utf8]{inputenc} to
 \usepackage[latin1]{inputenc}. All characters are recognized without any
 problems. I tested it both in Linux and Windows XP. This works fine.

 Now I will try to narrow down my problem and see if we can find a solution. I
 really believe the problem is in tex code generated by org. I will show you 
 the
 reason I am pointing the problem to org.

 If I have an org table in my file like this one:

 #+BEGIN: columnview :hlines 1 :vlines t :id 09.0001-ESCH :skip-empty-rows t
 |  | ITEM | Quotation | Sold | Required |
 |---+--+---+--+--|
 |  | * Escopo Horas|230 | 1640 | |
 |  | ** Gerência |10 |   | |
 |  | ** Definição |50 |   | |
 |  | ** Configuração   |100 |   | |
 |  | ** Comis.  Start up |50 |   | |
 |  | ** Documentação   |20 |   | |
 | / |   | |   | |
 #+END:

 Then I select the option to generate latex [L] export as LaTeX to temporary
 buffer ( I only want the tex code, I am not going to do any further
 transformation on it ). The raw code for that specific part of the file is:


 \begin{tabular}{l|l|r|l}
 ITEM   Quotation  Sold  Required \\
 \hline
 * Escopo Horas 230  1640   \\
 \textbf{* Gerência10   \\
 *} Definição   50   \\
 \textbf{* Configuração 100   \\
 *} Comis.  Start up   50   \\
 ** Documentação  20   \\
 \end{tabular}

 The problems I can point to in this code are:

 1) The code \textbf{* Gerência is wrong, it should be \textbf{*} Gerência
 2) The code *} Definição is wrong, it should be \textbf{*} Definição. The
 same problem happens in other rows as you can see above. So all these open
 command lines will be the source for the errors.
 3) One minor problem is that the character  at Comis.  Start up should 
 be
 genrated as \. However this is a minor problem and I just dont use this
 character anymore.

 Now I will describe my solution (workaround) I found today for it. Firstly I
 changed my org table configuration to:

 #+BEGIN: columnview :hlines 2 :vlines t :id 09.0001-ESCH :skip-empty-rows t
 |  | ITEM | Quotation | Sold | Required |
 |---+--+---+--+--|
 |  | * Escopo Horas|230 | 1640 | |
 |---+--+---+--+--|
 |  | ** Gerência |10 |   | |
 |---+--+---+--+--|
 |  | ** Definição |50 |   | |
 |---+--+---+--+--|
 |  | ** Configuração   |100 |   | |
 |---+--+---+--+--|
 |  | ** Comis.and Startup |50 |   | |
 |---+--+---+--+--|
 |  | ** Documentação   |20 |   | |
 | / |   | |   | |
 #+END:

 With the option :hlines 2 my table has horizontal lines in every row. When I
 generate tex, it will look like this:

 \begin{tabular}{l|l|r|l}
 ITEM  Quotation  Sold  Required \\
 \hline
 * Escopo Horas230  1640   \\
 \hline
 ** Gerência   10   \\
 \hline
 ** Definição  50   \\
 \hline
 ** Configuração100   \\
 \hline
 ** Comis.and Start up  50   \\
 \hline
 ** Documentação 20   \\
 \end{tabular}

 The above code is a perfect tex table and I get no errors, because now the 
 code
 is generated with \hline. I needed to deviate org tex generation code from
 using \textbuf :)

 That was quite detailed analysis so I tried to replicate it.

 This is the input file (I only added a first blank line and a dummy heading):

 --8---cut here---start-8---
 #
 * test table
 #+BEGIN: columnview :hlines 1 :vlines t :id 09.0001-ESCH  :skip-empty-rows t
 |   | ITEM | Quotation | Sold | Required |
 |---+--+---+--+--|
 |   | * Escopo Horas   |   230 | 1640 |  |
 |   | ** Ger�ncia  |10 |  |  |
 |   | ** Defini��o |50 |  |  |
 |   | ** Configura��o  |   100 |  |  |
 |   | ** Comis.  Start up |50 |  |  |
 |   | ** Documenta��o  |20 |  |  |
 | / || |||
 #+END:
 --8---cut here---end---8---

 I did a C-c C-e L to export to tex and following is what I got:

 --8---cut here---start-8---
 % Created 2009-02-09 Mon 19:35
 \documentclass[11pt,a4paper]{article}
 \usepackage[utf8]{inputenc}
 \usepackage[T1]{fontenc}
 

R: [Orgmode] Re: Latex export error in tables

2009-02-09 Thread Giovanni Ridolfi
--- Lun 9/2/09, Flávio flavio...@gmail.com ha scritto:
[...] snip
 3) One minor problem is that the character
  at Comis.  Start up
 should be
 genrated as \. However this is a minor
 problem and I just dont use this
 character anymore. 

Flavio, you can LaTeX-escape the :

Comis. \(\\) Start up

I hope it works, but I didn't test it.

cheers,
Giovanni


  Passa a Yahoo! Mail.

La webmail che ti offre GRATIS spazio illimitato, 
antispam e messenger integrato.
http://it.mail..yahoo.com/  



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Latex export error in tables

2009-02-08 Thread Manish
2009/2/8 Flávio de Souza
[...]

 I tried with smaller files (only one dynamic block) but the problem
 seems to disappear. I made some other attempts, but all useless. So I
 think is something related with all those blocks I am using in this
 particular org file.

Did those other files contain utf-8 characters?



 Problem happens 100% time when using my complete, that's the reason I
 sent the whole file.

[snip: pdflatex compile log]
 (/usr/share/texmf-texlive/tex/generic/babel/babel.def))) (./projeto.aux)
 Runaway argument?
 {\contentsline {subsection}{\numberline {4.1}Por qu\GenericError {(in\ETC.
 ! File ended while scanning use of \...@writefile.
 inserted text
\par
 l.14 \begin{document}

 (/usr/share/texmf/tex/context/base/supp-pdf.tex
 [Loading MPS to PDF converter (version 2006.09.02).]
 ) (/usr/share/texmf-texlive/tex/latex/hyperref/nameref.sty
 (/usr/share/texmf-texlive/tex/latex/oberdiek/refcount.sty)) (./projeto.out)
 (./projeto.out)

 ! Package inputenc Error: Unicode char \u8:ávi not set up for use with LaTeX.

I think this is an issue at a more fundamental level than with export to Latex
from Org.  Are you able to compile *any* utf-8 encoded tex file to PDF in your
setup at all (whether generated by Org or something else?)  I am no unicode
expert.  May be you would like to pursue this issue in parallel in some
tex|latex|pdflatex group as well?

-- 
Manish


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Latex export, unnumbered sections

2009-01-26 Thread Bernt Hansen
Nicolas Goaziou n.goaz...@neuf.fr writes:

 I'm running into some kind of problem with my export as latex and
 process as pdf setup. I would like to have all my headings numbered
 but a few ones. Sadly, I don't know about any mean to specify
 individually what header should be exported as starred or not.

 I still can export to latex, edit it and then process it as pdf, but,
 being the lazy type, I'd rather have it done automagically.

 So, am I missing an obvious option ? Has someone already solved that ?

 Thanks for any insight.

Can you give a short example of what it is you are trying to accomplish?

In the export options the H: value states how many heading levels to
export

,[ top of one of my exported org files ]
| #+OPTIONS: H:2 num:t toc:2 \n:nil todo:t @:t ::t |:t ^:nil -:t f:t *:t TeX:t 
LaTeX:nil skip:t d:nil tags:t
`

You can't specify individually which headlines should and shouldn't be
exported as numbered headlines as far as I know.

-Bernt


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX Export

2009-01-08 Thread Rasmus Pank Roulund
 I have tried to fix the issues with dollars, please download the
 latest GIT version and check if your stuff is now converted better.

I have gotten the newest git version from today. I have Org v6.17trans.

There is still something funny with $-signs.

Here are a couple of examples:
--
LaTeX output: 
  \item Hvis en vare har input \$x\$ \dots

Org:
  - Hvis en vare har input $x$ \dots
--
LaTeX output:
   $$M\overline{V}=P\overline{Y}$$
   \$M\$ er bestemt af centralbanken, og det eneste den bestemmer er
   prisniveauet.

Org:
 - Produktionsfunktionen brugt af monetarister:
   $$M\overline{V}=P\overline{Y}$$
   $M$ er bestemt af centralbanken, og det eneste den bestemmer er
   prisniveauet.
--
LaTeX output (this one is particuarily troublesome):
  \item På arbejdsmarkedet bestemmes ligevægten imellem $L_d$ og $L_s\$
   Her ud fra findes ligevægten i udbudet.

Org:
 - På arbejdsmarkedet bestemmes ligevægten imellem $L_d$ og $L_s$
   Her ud fra findes ligevægten i udbudet.
--
LaTeX (also troublesome):
  \item Givet ved $y=f(l, k)\$

Org: 
 - Givet ved $y=f(l, k)$
--
There are lots of \$ in the end of math even though there is no line
break.

Cheers,
Rasmus



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX Export

2009-01-08 Thread Carsten Dominik

Hi Rasmus,

please keep testing!

I have fixed the issues you mentioned in you mail - I am
sure there will be more.

Parsing TeX is hard, parsing pseudo-TeX like in Org-mode
is even harder.  Note that this will never be perfect.
In particular, $-parsing is a bitch.  You can elagantly
cheat out by using \(...\) and \[...\] instead.

- Carsten

On Jan 8, 2009, at 6:48 PM, Rasmus Pank Roulund wrote:


I have tried to fix the issues with dollars, please download the
latest GIT version and check if your stuff is now converted better.


I have gotten the newest git version from today. I have Org  
v6.17trans.


There is still something funny with $-signs.

Here are a couple of examples:
--
LaTeX output:
 \item Hvis en vare har input \$x\$ \dots

Org:
 - Hvis en vare har input $x$ \dots
--
LaTeX output:
  $$M\overline{V}=P\overline{Y}$$
  \$M\$ er bestemt af centralbanken, og det eneste den bestemmer  
er

  prisniveauet.

Org:
- Produktionsfunktionen brugt af monetarister:
  $$M\overline{V}=P\overline{Y}$$
  $M$ er bestemt af centralbanken, og det eneste den bestemmer er
  prisniveauet.
--
LaTeX output (this one is particuarily troublesome):
 \item På arbejdsmarkedet bestemmes ligevægten imellem $L_d$ og  
$L_s\$

  Her ud fra findes ligevægten i udbudet.

Org:
- På arbejdsmarkedet bestemmes ligevægten imellem $L_d$ og $L_s$
  Her ud fra findes ligevægten i udbudet.
--
LaTeX (also troublesome):
 \item Givet ved $y=f(l, k)\$

Org:
- Givet ved $y=f(l, k)$
--
There are lots of \$ in the end of math even though there is no line
break.

Cheers,
Rasmus



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: LaTeX Export

2009-01-05 Thread Rasmus Pank Roulund

 First of all, org 3.16c is very old indeed so *maybe* this works
 better in a more recent version?
Sorry, it is 6.16c :-) (Thanks Matthew!)
I believe it is the version bundled with the latest Emacsw32 from
ourcomments.org. I am using a Emacsw32 from December 2008.
Since I use win32 I am not able to use the provided update-script. 
Is is okay to overwrite the el files in the Emacs folder and recompile
them?

 Second, you could help with an example which demonstrates the problem.
Sorry. I should have included examples in the first post.
Here is an example from the notes I am working on.
The LaTeX output is:

\begin{itemize}
\item Indtegnes i et $x_1/x_2$-diagram, evt. med indifferentkurver.
\item Kurve, der sammensætte alle de bedste løsninger \$(x_1^{*},
  x_2^{*})$ ved varierende indkomst $m$.
\end{itemize}

Notice the \$ in the second item. Since I rarely use $ as a symbol but
use it all the time as math delimiter it would be more efficient to use
\$ when I actually need a $-sign.

Here is the corresponding Org code:

- Indtegnes i et $x_1/x_2$-diagram, evt. med indifferentkurver.
- Kurve, der sammensætte alle de bedste løsninger $(x_1^{*},
  x_2^{*})$ ved varierende indkomst $m$.

The trouble is probably caused by my auto-fill-mode hook, but I really
cannot stand long lines, and I absolutely love auto-fill-mode.

Here is an example of the information I would like to have washed out.
The LaTeX code contains the following:
\section{Forbrugeroverskud}
\label{sec-10}
  \texttt{SCHEDULED:} \texttt{2008-12-30 ti}
\texttt{CLOCK:} [2008-12-30 ti 13:42]--[2008-12-30 ti 15:47] =  2:05

Here is the corresponding Org code:
 * DONE Forbrugeroverskud
   SCHEDULED: 2008-12-30 ti
 CLOCK: [2008-12-30 ti 13:42]--[2008-12-30 ti 15:47] =  2:05

I have (setq org-export-with-timestamps t) btw.
With #+OPTIONS: :nil time stamps are still present (after refreshing
and re-exporting).

Another thing on LaTeX Export: Why so much \texttt{}? Org stamps (and
tags) such as CLOSED are written with \texttt{}. I am not sure why.

On check boxes: Can their look be customized? I would rather use
\CheckedBox and \Square from the Wasysym package. It is LaTeX so there
is no reason to use ASCII persudo boxes (IMO, of course). 

Long post. Sorry. 
--Rasmus



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Latex Export

2008-12-22 Thread Flávio de Souza

It is working now. 

I had only (require 'org) instead of (require 'org-install).

Thanks Carsten!

Carsten Dominik carsten.domi...@gmail.com writes:

 Do you have

  (require 'org-install)

 in your .emacs file, as the installation instructions
 spell out?

 - Carsten




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode