[O] CDlatex

2015-12-18 Thread Doyley, Marvin M.
Hi there,
I just upgrade my org-mode, and it seems that the function turn-on-org-cdlatex 
is no longer available, or maybe I am messing something.
M
---


[O] Cdlatex questions

2011-10-17 Thread Rasmus
Hi, 

I would like to add to cdlatex.  However, it does not seem to work.
This is probably the best place to ask. 

First, I want to add \mathbb{·} to cdlatex-math-modify-alist. 

Second, I want to change \mathbf{·} to \boldsymbol{·}, which is nicer
and works with greek letters.

I have tried to add the following code:

#+begin_src emacs-lisp
(add-to-list 'cdlatex-math-modify-alist
 '(98 "\\boldsymbol" "\\textbf" t nil nil))

(add-to-list 'cdlatex-math-modify-alist
 '(115 "\\mathbb" nil t nil nil))
#+end_src

However, it does not work; should I do something else to add symbols to
cdlatex?

Third, I would like to change the cdlatex-math symbol to something less
annoying.  I have tried

#+begin_src emacs-lisp 
(org-defkey org-cdlatex-mode-map "¨" 'cdlatex-math-symbol)
#+end_src 

However, this does not catch all cases, and for example "¨ ¨" will not
go to the second page.  Is there an easy way to change '`'.

–Rasmus

-- 
Sent from my Emacs




Re: [O] CDlatex

2015-12-18 Thread Nick Dokos
"Doyley, Marvin M."  writes:

> I just upgrade my org-mode, and it seems that the function
> turn-on-org-cdlatex is no longer available, or maybe I am messing
> something.

It's still there in org.el, line 18812 or thereabouts.

-- 
Nick




Re: [O] CDlatex

2015-12-19 Thread marvin doyley
Hi Nick,

You are correct it is still there,  but  I can’t start cdlatex-mode via the 
org-mode-hook (i.e., include add-hook 'org-mode-hook 'turn-on-org-cdlatex in my 
.emacs file). It only works when it type M-x cdlatex-mode in the buffer. Maybe 
it is clashing with something.

Best wishes,
M


Re: [O] Cdlatex questions

2011-10-19 Thread Carsten Dominik

On 17.10.2011, at 21:55, Rasmus wrote:

> Hi, 
> 
> I would like to add to cdlatex.  However, it does not seem to work.
> This is probably the best place to ask. 
> 
> First, I want to add \mathbb{·} to cdlatex-math-modify-alist. 
> 
> Second, I want to change \mathbf{·} to \boldsymbol{·}, which is nicer
> and works with greek letters.
> 
> I have tried to add the following code:
> 
> #+begin_src emacs-lisp
> (add-to-list 'cdlatex-math-modify-alist
> '(98 "\\boldsymbol" "\\textbf" t nil nil))
> 
> (add-to-list 'cdlatex-math-modify-alist
> '(115 "\\mathbb" nil t nil nil))
> #+end_src

Hi Rasmus,

you need to set these variables before cdlatex.el has been loaded, or you need
run (cdlatex-reset-mode) after you have changed them.  THis is not documented 
well,
unfortunately.

> 
> However, it does not work; should I do something else to add symbols to
> cdlatex?
> 
> Third, I would like to change the cdlatex-math symbol to something less
> annoying.  I have tried
> 
> #+begin_src emacs-lisp 
> (org-defkey org-cdlatex-mode-map "¨" 'cdlatex-math-symbol)
> #+end_src 
> 
> However, this does not catch all cases, and for example "¨ ¨" will not
> go to the second page.  Is there an easy way to change '`'.

You also need to change `cdlatex-math-symbol-prefix'.

HTH

- Carsten

> 
> –Rasmus
> 
> -- 
> Sent from my Emacs
> 
> 




Re: [O] Cdlatex questions

2011-10-19 Thread Rasmus Pank Roulund
Carsten Dominik  writes:
> Hi Rasmus,
>
> you need to set these variables before cdlatex.el has been loaded, or you need
> run (cdlatex-reset-mode) after you have changed them.  THis is not documented 
> well,
> unfortunately.

Thanks Carsten.

For the reference I use the following snip now which and it works as I
want it to work.

#+begin_src emacs-lisp

(add-to-list 'cdlatex-math-modify-alist
 '(98 "\\boldsymbol" "\\textbf" t nil nil))

(add-to-list 'cdlatex-math-modify-alist
 '(115 "\\mathbb" nil t nil nil))

(org-defkey org-cdlatex-mode-map "¨" 'cdlatex-math-symbol)
(setq cdlatex-math-symbol-prefix 168)

;;(cdlatex-reset-mode)
(require 'cdlatex)

#+end_src


–Rasmus

-- 
Sent from my Emacs



[O] Cdlatex and ELPA

2013-12-09 Thread Rasmus
Hi,

Since I use multiple computers I'd like to cdlatex in GNU ELPA.  An
outdated version is currently on Marmelade, but I think that version
doesn't work with current Org (v4.0 vs. v4.6).  Also, cdlatex deserves
to be in GNU ELPA IMO.

There's this snip in cdlatex.el:

;; CDLaTeX requires texmathp.el which is distributed with AUCTeX.
;; Starting with Emacs 21.3, texmathp.el will be part of Emacs.


It seems texmathp never made it to Emacs-core, but AUCTeX is in ELPA
so it could be required.

(On a side note, it says cdlatex.el is part of Emacs, but I have
always had to install it separately. . .)

I have attached a tiny patch that makes cdlatex compatible with ELPA
so that I can just do package-install-from-buffer on the file.  I
think this is enough for distributing it via ELPA.

–Rasmus

The rest is not essential:

Perhaps AUCTeX is a too heavy dependency which might 'talk' in favor
of distributing textmathp.el separately.  However, I'm not sure if
package.el supports some kind of either (i) an "or" statement in
'Package-Requires' or (ii) a 'Package-Provides' for people who have
AUCTeX installed.  Of course texmathp.el could be required by AUCTeX,
but that's a bit imposing. . .


-- 
If you can mix business and politics wonderful things can happen!
diff --git a/cdlatex-orig.el b/cdlatex.el
index 05f0d91..f76ffad 100644
--- a/cdlatex-orig.el
+++ b/cdlatex.el
@@ -1,9 +1,10 @@
-;;; cdlatex.el -- Fast input methods for LaTeX environments and math
+;;; cdlatex.el --- Fast input methods for LaTeX environments and math
 ;; Copyright (c) 2010, 2011, 2012 Free Software Foundation, Inc.
 ;;
 ;; Author: Carsten Dominik 
 ;; Keywords: tex
-;; Version: 4.6
+;; Version: 4.7
+;; Package-Requires: ((auctex "11.85"))
 ;;
 ;; This file is part of GNU Emacs.
 ;;


[O] cdlatex and indentation

2014-07-10 Thread Federico Beffa
Hi,

when I insert a LaTeX environment with the cdlatex keybinding C-{, the
environment is not properly indented as the rest of the text and the TAB
key is bound to the cdlatex functions. Is there a way to get it properly
aligned directly, without having to select the region and press TAB?

I would like to achieve a real indentation and not a virtual one as
provided by org-indent-mode. Therefore org-indent-mode is nil and
org-adapt-indent is t (as per the default config).

Thanks,
Fede


[O] CDLaTeX in Org document

2013-10-25 Thread Vladimir Lomov
Hello,
I'm using CDLaTeX with Org documents and with LaTeX ones (AUCTeX major
mode). I configured cdlatex to insert closing brackets and dollar (
'$({[' ) and this works fine in AUCTeX major mode. Is it possible to use
similar feature in combination Org+cdlatex?

I tested with following settings
 8< 
(add-to-list 'load-path "/usr/share/emacs/site-lisp/org")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/auctex")
(setq cdlatex-simplify-sub-super-scripts nil)
(setq cdlatex-paired-parens "$([{")
(require 'org)
(add-hook 'org-mode-hook 'turn-on-org-cdlatex)
(setq org-use-sub-superscripts '{})
 8< 

And it didn't work.

---
WBR, Vladimir Lomov

-- 

There's no heavier burden than a great potential.



Re: [O] Cdlatex and ELPA

2013-12-09 Thread Rasmus

Rasmus  writes:

> Perhaps AUCTeX is a too heavy dependency which might 'talk' in favor
> of distributing textmathp.el separately.  However, I'm not sure if
> package.el supports some kind of either (i) an "or" statement in
> 'Package-Requires' or (ii) a 'Package-Provides' for people who have
> AUCTeX installed.  Of course texmathp.el could be required by AUCTeX,
> but that's a bit imposing. . .

BTW: I more or less choose a random minimum version for AUCTeX.
Probably an older version could be specified. In other words, I don't
know the "true" minimum version.

–Rasmus

-- 
Hvor meget poesi tror De kommer ud af et glas isvand?




Re: [O] Cdlatex and ELPA

2013-12-09 Thread Achim Gratz
Rasmus writes:
> Since I use multiple computers I'd like to cdlatex in GNU ELPA.  An
> outdated version is currently on Marmelade, but I think that version
> doesn't work with current Org (v4.0 vs. v4.6).  Also, cdlatex deserves
> to be in GNU ELPA IMO.

Don't you think that emacs-devel would be a better place for this
discussion?


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

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




Re: [O] CDLaTeX in Org document

2013-10-27 Thread Carsten Dominik

On 26.10.2013, at 08:47, Vladimir Lomov  wrote:

> Hello,
> I'm using CDLaTeX with Org documents and with LaTeX ones (AUCTeX major
> mode). I configured cdlatex to insert closing brackets and dollar (
> '$({[' ) and this works fine in AUCTeX major mode. Is it possible to use
> similar feature in combination Org+cdlatex?

Hi Vladimir,

this is not supported currently.  Overwriting the key bindings
for ([{ and $ would cause other problems, because Org already
does other stuff with self-insert characters (see the function
org-self-insert-command) like speed commands and automatic
adjustments in tables.  So there is not simple fix, would
require a more complex fix.

- Carsten

> 
> I tested with following settings
>  8< 
> (add-to-list 'load-path "/usr/share/emacs/site-lisp/org")
> (add-to-list 'load-path "/usr/share/emacs/site-lisp/auctex")
> (setq cdlatex-simplify-sub-super-scripts nil)
> (setq cdlatex-paired-parens "$([{")
> (require 'org)
> (add-hook 'org-mode-hook 'turn-on-org-cdlatex)
> (setq org-use-sub-superscripts '{})
>  8< 
> 
> And it didn't work.
> 
> ---
> WBR, Vladimir Lomov
> 
> -- 
> 
> There's no heavier burden than a great potential.
> 




[O] CDLaTeX (4.0) not working in Org mode (8.0.3)?

2013-05-19 Thread Omid
I see the following strange behavior from Org-CDLaTeX (OCDL).

Outside a * heading it works. Inside a * heading (or anything under that)
it does NOT work. What can be causing this?

Here is a minimal example:

# Org CDLaTeX (OCDL) works here (at least does not issue an error)
\[
x^2
\]

* heading
** subheading
   # Org CDLaTeX (OCDL) does NOT work here. Pressing ^ (caret) or _
   # (underscore) causes the following error to appear in *Messages*
   # buffer:
   #
   # call-interactively: Symbol's value as variable is void:
   # last-command-char
   \[
   x
   \]
   # Same error here.
   \begin{align*}
   x
   \end{align*}


Re: [O] CDLaTeX (4.0) not working in Org mode (8.0.3)?

2013-05-20 Thread Longmin WANG
On Mon, May 20, 2013 at 11:14 AM, Omid  wrote:

> I see the following strange behavior from Org-CDLaTeX (OCDL).
>
> Outside a * heading it works. Inside a * heading (or anything under that)
> it does NOT work. What can be causing this?
>
> Here is a minimal example:
>
> # Org CDLaTeX (OCDL) works here (at least does not issue an error)
> \[
> x^2
> \]
>
> * heading
> ** subheading
># Org CDLaTeX (OCDL) does NOT work here. Pressing ^ (caret) or _
># (underscore) causes the following error to appear in *Messages*
># buffer:
>#
># call-interactively: Symbol's value as variable is void:
># last-command-char
>\[
>x
>\]
># Same error here.
>\begin{align*}
>x
>\end{align*}
>
>
last-command-char should be changed to last-command-event in cdlatex.el.

-- 
Longmin Wang (http://wanglm.droppages.com/)
Nankai University, 94 Weijin Road, Tianjin 300071, P. R. China



Re: [O] CDLaTeX (4.0) not working in Org mode (8.0.3)?

2013-05-20 Thread Omid
Thanks. I confirm that this in fact solves the problem.


On Mon, May 20, 2013 at 3:57 AM, Longmin WANG  wrote:

>
>
> On Mon, May 20, 2013 at 11:14 AM, Omid  wrote:
>
>> I see the following strange behavior from Org-CDLaTeX (OCDL).
>>
>> Outside a * heading it works. Inside a * heading (or anything under that)
>> it does NOT work. What can be causing this?
>>
>> Here is a minimal example:
>>
>> # Org CDLaTeX (OCDL) works here (at least does not issue an error)
>> \[
>> x^2
>> \]
>>
>> * heading
>> ** subheading
>># Org CDLaTeX (OCDL) does NOT work here. Pressing ^ (caret) or _
>># (underscore) causes the following error to appear in *Messages*
>># buffer:
>>#
>># call-interactively: Symbol's value as variable is void:
>># last-command-char
>>\[
>>x
>>\]
>># Same error here.
>>\begin{align*}
>>x
>>\end{align*}
>>
>>
> last-command-char should be changed to last-command-event in cdlatex.el.
>
> --
> Longmin Wang (http://wanglm.droppages.com/)
> Nankai University, 94 Weijin Road, Tianjin 300071, P. R. China
> 
>


Re: [O] CDLaTeX (4.0) not working in Org mode (8.0.3)?

2013-08-30 Thread Carsten Dominik

On 20.5.2013, at 10:59, Omid  wrote:

> Thanks. I confirm that this in fact solves the problem.


This is also fixed in CDLaTeX 4.6 at 
http://staff.science.uva.nl/~dominik/Tools/cdlatex

- Carsten

> 
> 
> On Mon, May 20, 2013 at 3:57 AM, Longmin WANG  wrote:
> 
> 
> On Mon, May 20, 2013 at 11:14 AM, Omid  wrote:
> I see the following strange behavior from Org-CDLaTeX (OCDL).
> 
> Outside a * heading it works. Inside a * heading (or anything under that) it 
> does NOT work. What can be causing this?
> 
> Here is a minimal example:
> 
> # Org CDLaTeX (OCDL) works here (at least does not issue an error)
> \[
> x^2
> \]
> 
> * heading
> ** subheading
># Org CDLaTeX (OCDL) does NOT work here. Pressing ^ (caret) or _
># (underscore) causes the following error to appear in *Messages*
># buffer:
># 
># call-interactively: Symbol's value as variable is void:
># last-command-char
>\[
>x
>\]
># Same error here.
>\begin{align*}
>x
>\end{align*}
> 
> 
> last-command-char should be changed to last-command-event in cdlatex.el. 
> 
> -- 
> Longmin Wang (http://wanglm.droppages.com/)
> Nankai University, 94 Weijin Road, Tianjin 300071, P. R. China
>