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
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 > >
Carsten Dominik <carsten.dominik@gmail.com> 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