Re: [O] org-pretty-entities and org-cdlatex

2012-09-07 Thread Thomas Holst
Hi,

· Giovanni Ridolfi  wrote:
> Da: Thomas Holst 
> Inviato: Mercoledì 5 Settembre 2012 12:20
>>· Carsten Dominik  wrote:
>
>>> On 5.9.2012, at 11:08, Thomas Holst wrote:
>>
 Hello,
>>> 
 there is a different behaviour of sub (_) and superscripts (^) depending
 on =org-pretty-entities=. When I type:
 
  =ab_cdef=
 
 inside LaTeX fragments with =org-pretty-entities= enabled I get:
 
  \( ab_{c}def \)
         
 
 With =org-pretty-entities= disabled I get:
 
  \( ab_{cdef} \)
          
>>>
>>> I am not able to reproduce this, I get the second behavior always.
>
>> I also tested it with emacs 23.2 on WinXP. 
>
>> Maybe it is a problem related to emacs on Windows.
> Hi, Thomas and Carsten,
> [ confirms behaviour on Windows ]
> Giovanni

yesterday I tested it under Ubuntu 12.04 and emacs 23.2.

Typing =ab_cdef= inside a LaTeX fragment results in

\( ab_{c}def \) with org-pretty-entities enabled and
\( ab_{cdef} \) with org-pretty-entities disabled

I even tested it in a terminal with emacs 23.2.1 under cygwin. Same
result.

I tried to debug this. But my elisp is too limited to get a clue what is
going on here.

Thanks for looking into this.
-- 
Bis neulich ...
  Thomas



Re: [O] org-pretty-entities and org-cdlatex

2012-09-05 Thread Giovanni Ridolfi
Da: Thomas Holst 
Inviato: Mercoledì 5 Settembre 2012 12:20

>· Carsten Dominik  wrote:

>> On 5.9.2012, at 11:08, Thomas Holst wrote:
>
>>> Hello,
>> 
>>> there is a different behaviour of sub (_) and superscripts (^) depending
>>> on =org-pretty-entities=. When I type:
>>> 
>>>  =ab_cdef=
>>> 
>>> inside LaTeX fragments with =org-pretty-entities= enabled I get:
>>> 
>>>  \( ab_{c}def \)
>> >         
>>> 
>>> With =org-pretty-entities= disabled I get:
>>> 
>>>  \( ab_{cdef} \)
>>>          
>>
>> I am not able to reproduce this, I get the second behavior always.

> I also tested it with emacs 23.2 on WinXP. 

> Maybe it is a problem related to emacs on Windows.
Hi, Thomas and Carsten,

I downloaded texmathp.el from here:
https://raw.github.com/jwiegley/auctex/master/texmathp.el
cdlatex from here:
http://staff.science.uva.nl/~dominik/Tools/cdlatex/cdlatex.el

loaded them M-x load-file

Org-mode version 7.9.1 (c276eeebeec 
GNU Emacs 24.1.1 (i386-mingw-nt6.1.7601) of 2012-06-10 on MARVIN
Windows 7

org-pretty-entities  nil  (default)

M-x org-cdlatex-mode

** CDLatex

\( ab_{cdef} \)

if org-pretty-entities on (via customization interface)  I get: 

\(  ab_{c}def  \)

so I confirm the behaviour of Thomas under Windows

cheers
Giovanni




Re: [O] org-pretty-entities and org-cdlatex

2012-09-05 Thread Thomas Holst
Hi Carsten,

here is an update on the subject. I performed a another test with emacs
23.3.1 under cygwin X11. I see same behaviour as under WinXP.

Maybe I have to clarifiy what I did. So here is a step by step
procedure.

Inside an orgmode document do the following:

  Set =org-pretty-entities= to nil

  (setq org-pretty-entities nil)  C-x C-e

  now type =ab_cdef= inside a LaTeX environment \(  \). As a result I get:

  \( ab_{cdef} \)

  Now turn on =org-pretty-entities=

  (setq org-pretty-entities t) or C-c C-x \ and again type =ab_cdef= in
  an LaTeX environment. As a result I get:

  \( ab_{c}def \)

  Which is not what cdlatex doc says.

I tested this with 
emacs-version  23.3.1 under cygwin
   23.2 under WinXP
   24.0.50.1 under WinXP

Emacs started as posted in my pevious post. =emacs -Q= and minimal
org-mode and org-cdlatex setup.

org-mode Version:
(org-version)
release_7.9.1-138-geeb5b9 @ c:/daten/users/DE_hts2fe/git/org-mode/lisp/

I get the same results in all tree cases.

I hope that clarifies what I ment originally. Sorry for not beeing clear.

-- 
Bis neulich ...
  Thomas



Re: [O] org-pretty-entities and org-cdlatex

2012-09-05 Thread Thomas Holst
Hi Casten,

· Carsten Dominik  wrote:
> On 5.9.2012, at 12:20, Thomas Holst wrote:
>
[... snip ...]
>>> 
>>> I am not able to reproduce this, I get the second behavior always.
>>> 
>>> - Carsten
>>> 
>> 
>> I also tested it with emacs 23.2 on WinXP. I get different results
>> depending on =org-pretty-entititis=.
>> 
>> I will try it on my Ubuntu machine at home and come back with the
>> results. Maybe it is a problem related to emacs on Windows.
>> 
>> Thanks for looking into this.
>
> Do you have any settings for cdlatex.el?  I guess not because you are using 
> -Q….

I have no settings for cdlatex. I started emacs in a cmd shell with:

start C:\Programme\gnu\emacs-24.0.50.1\bin\emacs.exe -Q --eval "(load-file 
\"~/emacs/Testing/init.el\")"

With init.el containing:

#+BEGIN_SRC emacs-lisp
  ;; 
-
  ;; Pfade auf lokales org-mode git-repository setzen
  ;; 
-
  (add-to-list 'load-path "~/git/org-mode/lisp")
  (add-to-list 'load-path "~/git/site-lisp")
  (add-to-list 'load-path "~/git/site-lisp/auctex")
  ;; pfad zu contib/lisp
  (add-to-list 'load-path "~/git/org-mode/contrib/lisp")
  (add-to-list 'load-path "~/git/org-mode/contrib/babel/lisp")

  (require 'org-install)
  ;; (require 'org-export)
  ;; (require 'org-e-latex)
  (require 'cdlatex)
  (find-file "c:/daten/users/DE_hts2fe/emacs/OrgMode/testing/testing.org")
  (turn-on-org-cdlatex)
#+END_SRC

And Testing.org containing:

#+BEGIN_SRC org
  #+TITLE: new-exporter.org
  #+AUTHOR:Thomas Holst
  #+EMAIL: thomas.ho...@de.bosch.com
  #+DATE:  2012-07-16 Mo
  #+DESCRIPTION:
  #+KEYWORDS:
  #+LANGUAGE:  en
  #+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:{} -:t f:t *:t <:t
  #+OPTIONS:   TeX:t LaTeX:t skip:nil d:t todo:t pri:nil tags:t
  #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 
path:http://orgmode.org/org-info.js
  #+EXPORT_SELECT_TAGS: export
  #+EXPORT_EXCLUDE_TAGS: noexport
  #+LINK_UP:   
  #+LINK_HOME: 
  #+XSLT:
  #+LATEX_CLASS: article

  * org-cdlatex and org-pretty-entities

\( ab_{c}def \)
\( ab_{cdef} \)
#+END_SRC

As said before I will test it on my Ubuntu machine at home. But it will
be tomorrow evening till I have time to perform the test.

Thanks again.

-- 
Bis neulich ...
  Thomas



Re: [O] org-pretty-entities and org-cdlatex

2012-09-05 Thread Carsten Dominik

On 5.9.2012, at 12:20, Thomas Holst wrote:

> Hello,
> 
> · Carsten Dominik  wrote:
> 
>> On 5.9.2012, at 11:08, Thomas Holst wrote:
>> 
>>> Hello,
>>> 
>>> there is a different behaviour of sub (_) and superscripts (^) depending
>>> on =org-pretty-entities=. When I type:
>>> 
>>> =ab_cdef=
>>> 
>>> inside LaTeX fragments with =org-pretty-entities= enabled I get:
>>> 
>>> \( ab_{c}def \)
>>> 
>>> 
>>> With =org-pretty-entities= disabled I get:
>>> 
>>> \( ab_{cdef} \)
>>> 
>> 
>> I am not able to reproduce this, I get the second behavior always.
>> 
>> - Carsten
>> 
> 
> I also tested it with emacs 23.2 on WinXP. I get different results
> depending on =org-pretty-entititis=.
> 
> I will try it on my Ubuntu machine at home and come back with the
> results. Maybe it is a problem related to emacs on Windows.
> 
> Thanks for looking into this.

Do you have any settings for cdlatex.el?  I guess not because you are using -Q….

- Carsten

> 
> -- 
> Bis neulich ...
>  Thomas




Re: [O] org-pretty-entities and org-cdlatex

2012-09-05 Thread Thomas Holst
Hello,

· Carsten Dominik  wrote:

> On 5.9.2012, at 11:08, Thomas Holst wrote:
>
>> Hello,
>> 
>> there is a different behaviour of sub (_) and superscripts (^) depending
>> on =org-pretty-entities=. When I type:
>> 
>>  =ab_cdef=
>> 
>> inside LaTeX fragments with =org-pretty-entities= enabled I get:
>> 
>>  \( ab_{c}def \)
>>  
>> 
>> With =org-pretty-entities= disabled I get:
>> 
>>  \( ab_{cdef} \)
>>  
>
> I am not able to reproduce this, I get the second behavior always.
>
> - Carsten
>

I also tested it with emacs 23.2 on WinXP. I get different results
depending on =org-pretty-entititis=.

I will try it on my Ubuntu machine at home and come back with the
results. Maybe it is a problem related to emacs on Windows.

Thanks for looking into this.

-- 
Bis neulich ...
  Thomas



Re: [O] org-pretty-entities and org-cdlatex

2012-09-05 Thread Carsten Dominik

On 5.9.2012, at 11:08, Thomas Holst wrote:

> Hello,
> 
> there is a different behaviour of sub (_) and superscripts (^) depending
> on =org-pretty-entities=. When I type:
> 
>  =ab_cdef=
> 
> inside LaTeX fragments with =org-pretty-entities= enabled I get:
> 
>  \( ab_{c}def \)
>  
> 
> With =org-pretty-entities= disabled I get:
> 
>  \( ab_{cdef} \)
>  

I am not able to reproduce this, I get the second behavior always.

- Carsten

> 
> I have to type  to get out of subsciript. According to cdlatex doc
> the second behaviour is intended. Is this a bug or am I missing some
> setup? 
> 
> Tested with emacs -Q
> 
> org-version:
> Org-mode version 7.9.1
>  (release_7.9.1-142-gdfea24 @
>   c:/daten/users/DE_hts2fe/git/org-mode/lisp/)
> 
> emacs-version:
> 24.0.50.1 on WinXP
> 
> -- 
> Bis neulich ...
>  Thomas
> 




[O] org-pretty-entities and org-cdlatex

2012-09-05 Thread Thomas Holst
Hello,

there is a different behaviour of sub (_) and superscripts (^) depending
on =org-pretty-entities=. When I type:

  =ab_cdef=

inside LaTeX fragments with =org-pretty-entities= enabled I get:

  \( ab_{c}def \)
  

With =org-pretty-entities= disabled I get:

  \( ab_{cdef} \)
  
  
I have to type  to get out of subsciript. According to cdlatex doc
the second behaviour is intended. Is this a bug or am I missing some
setup? 

Tested with emacs -Q

org-version:
Org-mode version 7.9.1
  (release_7.9.1-142-gdfea24 @
   c:/daten/users/DE_hts2fe/git/org-mode/lisp/)

emacs-version:
24.0.50.1 on WinXP

-- 
Bis neulich ...
  Thomas