emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org Mode Latex Export Customization of org-export-latex-emphasis-alist
@ 2010-06-28  0:04 Gaurav Sharma
  2010-06-29 11:11 ` Giovanni Ridolfi
  0 siblings, 1 reply; 4+ messages in thread
From: Gaurav Sharma @ 2010-06-28  0:04 UTC (permalink / raw)
  To: emacs-orgmode

Hello!

I am a relative newbie to Org even though Emacs has been my editor of
choice for a long time. I'm trying to customize the
org-export-latex-emphasis-alist by using the following in my .emacs

(setq org-export-latex-emphasis-alist (quote (("*" "\\textbf{%s}" nil)
("/" "\\emph{%s}" nil) ("_" "\\alert{%s}" nil) ("+" "\\st{%s}" nil)
("=" "\\verb" t) ("@" "\\alert{%s}" nil) ("!" "\\note{%s}" nil) ("~"
"\\verb" t))))

Several of the above re-definitions seem to take effect. In fact, in
the above "_" is redefined to be the same as "@" for testing that the
re-definition is indeed effective and I have verified that it is.
However, the definitions of "@" and "!" do not seem to take effect at
all. I see the same behavior when I customize this variable through
the Org->customize interface. I've tried a lot of things and am at my
wits end in terms of figuring out this weird behavior.

I would very much appreciate if someone could shed more light on this.
My initial thought was whether there could be a dependency on latex
packages that make alternate use of these special symbols. However,
that should come into play only in the latex file and upon seeing the
latex file I see that indeed the definitions of "@" and "!" seem
ineffective. In case it matters, I am working with a org file intended
for use with beamer that is included below.

Suggestions for a fix would be very helpful.

Thanks much in advance for your help,

-- Gaurav

____Test Org File ___

#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation]
#+BEAMER_FRAME_LEVEL: 1

#+BEAMER_HEADER_EXTRA: \usetheme{default}\usecolortheme{default}
#+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args)
%4BEAMER_col(Col) %8BEAMER_extra(Extra)
#+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 :ETC

* Test  :export:

** Test of Underline and Alert functionality
*** _test_
** _Test of Underscore_
** +Test of Plus+
** @Alert Test@
** !Note test!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Org Mode Latex Export Customization of org-export-latex-emphasis-alist
  2010-06-28  0:04 Org Mode Latex Export Customization of org-export-latex-emphasis-alist Gaurav Sharma
@ 2010-06-29 11:11 ` Giovanni Ridolfi
  2010-06-29 11:29   ` Giovanni Ridolfi
  2010-06-29 17:57   ` Gaurav Sharma
  0 siblings, 2 replies; 4+ messages in thread
From: Giovanni Ridolfi @ 2010-06-29 11:11 UTC (permalink / raw)
  To: gsharma; +Cc: emacs-orgmode

Gaurav Sharma <gvshar@gmail.com> writes:

> customize the
> org-export-latex-emphasis-alist by using the following in my .emacs
>
> (setq org-export-latex-emphasis-alist

I -[Org 6.36 trans]- don't have this variable. ?-). 
which org-version do you use? you can see with:

M-x org-version 

>  (quote (("*" "\\textbf{%s}" nil)
> ("/" "\\emph{%s}" nil) ("_" "\\alert{%s}" nil) ("+" "\\st{%s}" nil)
> ("=" "\\verb" t) ("@" "\\alert{%s}" nil) ("!" "\\note{%s}" nil) ("~"
> "\\verb" t))))
>

> However, the definitions of "@" and "!" do not seem to take effect at
> all. 
Could you please change the characters avoiding "@" "!" ?
(I know there is not much choice of characters that can be used as 
"emphasis delimiters" )

But I think that "@" "!" does interfere with some regexp:
e.g.  "@" is used in the HTML export.

cheers, 
Giovanni

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: Org Mode Latex Export Customization of org-export-latex-emphasis-alist
  2010-06-29 11:11 ` Giovanni Ridolfi
@ 2010-06-29 11:29   ` Giovanni Ridolfi
  2010-06-29 17:57   ` Gaurav Sharma
  1 sibling, 0 replies; 4+ messages in thread
From: Giovanni Ridolfi @ 2010-06-29 11:29 UTC (permalink / raw)
  To: emacs-orgmode

Giovanni Ridolfi <giovanni.ridolfi@yahoo.it> writes:

>> (setq org-export-latex-emphasis-alist
>
> I -[Org 6.36 trans]-  don't have this variable. ?-). 
Hey,                  you do   have it, 
look in the org-latex.el file!

G

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Org Mode Latex Export Customization of org-export-latex-emphasis-alist
  2010-06-29 11:11 ` Giovanni Ridolfi
  2010-06-29 11:29   ` Giovanni Ridolfi
@ 2010-06-29 17:57   ` Gaurav Sharma
  1 sibling, 0 replies; 4+ messages in thread
From: Gaurav Sharma @ 2010-06-29 17:57 UTC (permalink / raw)
  To: Giovanni Ridolfi; +Cc: emacs-orgmode

Dear Giovanni,

Thanks much for your response. I'm using Org-mode version 6.36. I'm
guessing (based on what I read up) that it will not show up in emacs
until you load org-latex.

I also found a useful thread on this topic at:

http://osdir.com/ml/emacs-orgmode-gnu/2009-11/msg01028.html

which also indicated that @ and ! interfere with some regexp. The
solutions suggested there were to either:

1) Add these through the Org->Customize interface
or
2) Place in .emacs before org is loaded.

Neither of these however seem to help in my case. I also learn't about
org-submit-bug-report, and am including the full bug report below, in
case that suggests something I am missing.

I also thought of using alternate special characters as as emphasis
delimiters but coudn't readily find ones that weren't taken - just as
you also point out.  At the moment, I've given up on trying to resolve
this and am directly using \alert{} where I need it.

Thanks again.

-Gaurav

____________ Bug report - including configuration _____


Emacs  : GNU Emacs 22.3.1 (i386-mingw-nt5.2.3790)
 of 2008-09-06 on SOFT-MJASON
Package: Org-mode version 6.36

current state:
==============
(setq
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-export-preprocess-hook '(org-export-blocks-preprocess)
 org-tab-first-hook '(org-hide-block-toggle-maybe)
 org-src-mode-hook '(org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-cycle-hook '(org-cycle-hide-archived-subtrees
org-cycle-hide-drawers org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
 org-export-latex-classes '(("beamer"
			     "\\documentclass[t]{beamer}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}
\n\\usepackage{pgf}
\n\\usepackage{amsmath}\n\\usepackage{amssymb}\n\\usepackage{graphicx}\n\\usepackage{graphics}\n\\usepackage{listings}\n\\usepackage{hyperref}"
org-beamer-sectioning)
			    ("article" "\\documentclass[11pt]{article}" ("\\section{%s}" .
"\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}")
			     ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" .
"\\subparagraph*{%s}"))
			    ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" .
"\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
			     ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" .
"\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
			    ("book" "\\documentclass[11pt]{book}" ("\\part{%s}" .
"\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" .
"\\section*{%s}")
			     ("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
			    ("beamer" "\\documentclass{beamer}" org-beamer-sectioning))
 org-export-preprocess-before-normalizing-links-hook
'(org-remove-file-link-modifiers)
 org-mode-hook '((lambda nil (setq org-mouse-context-menu-function
(quote org-mouse-context-menu))
		  (when (memq (quote context-menu) org-mouse-features) (org-defkey
org-mouse-map [mouse-3] nil)
		   (org-defkey org-mode-map [mouse-3] (quote org-mouse-show-context-menu)))
		  (org-defkey org-mode-map [down-mouse-1] (quote org-mouse-down-mouse))
		  (when (memq (quote context-menu) org-mouse-features) (org-defkey
org-mouse-map [C-drag-mouse-1] (quote org-mouse-move-tree))
		   (org-defkey org-mouse-map [C-down-mouse-1] (quote
org-mouse-move-tree-start)))
		  (when (memq (quote yank-link) org-mouse-features) (org-defkey
org-mode-map [S-mouse-2] (quote org-mouse-yank-link))
		   (org-defkey org-mode-map [drag-mouse-3] (quote org-mouse-yank-link)))
		  (when (memq (quote move-tree) org-mouse-features) (org-defkey
org-mouse-map [drag-mouse-3] (quote org-mouse-move-tree))
		   (org-defkey org-mouse-map [down-mouse-3] (quote
org-mouse-move-tree-start)))
		  (when (memq (quote activate-stars) org-mouse-features)
		   (font-lock-add-keywords nil (\` (((\, outline-regexp) 0 (\` (face
org-link mouse-face highlight keymap (\, org-mouse-map))) (quote
prepend)))) t))
		  (when (memq (quote activate-bullets) org-mouse-features)
		   (font-lock-add-keywords nil
		    (\` (("^[ 	]*\\([-+*]\\|[0-9]+[.)]\\) +" (1 (\` (face org-link
keymap (\, org-mouse-map) mouse-face highlight)) (quote prepend)))))
t)
		   )
		  (when (memq (quote activate-checkboxes) org-mouse-features)
		   (font-lock-add-keywords nil
		    (\` (("^[ 	]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ X]\\]\\)" (2 (\`
(face bold keymap (\, org-mouse-map) mouse-face highlight)) t)))) t)
		   )
		  (defadvice org-open-at-point (around org-mouse-open-at-point activate)
		   (let ((context (org-context)))
		    (cond ((assq :headline-stars context) (org-cycle)) ((assq
:checkbox context) (org-toggle-checkbox))
		     ((assq :item-bullet context) (let
((org-cycle-include-plain-lists t)) (org-cycle))) (t ad-do-it))
		    )
		   )
		  )
		 #[nil "\300\301\302\303\304$\207" [org-add-hook
change-major-mode-hook org-show-block-all append local] 5])
 org-export-latex-emphasis-alist '(("*" "\\textbf{%s}" nil) ("/"
"\\emph{%s}" nil) ("_" "\\underline{%s}" nil) ("+" "\\st{%s}" nil)
("=" "\\verb" t) ("~" "\\verb" t)
				   ("@" "\\alert{%s}" nil))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-mode-hook '((lambda nil (setq
org-mouse-context-menu-function (quote org-mouse-agenda-context-menu))
			 (org-defkey org-agenda-mode-map [mouse-3] (quote
org-mouse-show-context-menu))
			 (org-defkey org-agenda-mode-map [down-mouse-3] (quote
org-mouse-move-tree-start))
			 (org-defkey org-agenda-mode-map [C-mouse-4] (quote
org-agenda-earlier)) (org-defkey org-agenda-mode-map [C-mouse-5]
(quote org-agenda-later))
			 (org-defkey org-agenda-mode-map [drag-mouse-3]
			  (quote (lambda (event) (interactive "e") (case
(org-mouse-get-gesture event) (:left (org-agenda-earlier 1)) (:right
(org-agenda-later 1))))))
			 )
			)
 org-occur-hook '(org-first-headline-recenter)
 org-from-is-user-regexp nil
 org-export-preprocess-before-selecting-backend-code-hook
'(org-beamer-select-beamer-code)
 org-export-latex-final-hook '(org-beamer-amend-header
org-beamer-fix-toc org-beamer-auto-fragile-frames
org-beamer-place-default-actions-for-lists)
 )


_________________________________


On Tue, Jun 29, 2010 at 7:11 AM, Giovanni Ridolfi
<giovanni.ridolfi@yahoo.it> wrote:
> Gaurav Sharma <gvshar@gmail.com> writes:
>
>> customize the
>> org-export-latex-emphasis-alist by using the following in my .emacs
>>
>> (setq org-export-latex-emphasis-alist
>
> I -[Org 6.36 trans]- don't have this variable. ?-).
> which org-version do you use? you can see with:
>
> M-x org-version
>
>>  (quote (("*" "\\textbf{%s}" nil)
>> ("/" "\\emph{%s}" nil) ("_" "\\alert{%s}" nil) ("+" "\\st{%s}" nil)
>> ("=" "\\verb" t) ("@" "\\alert{%s}" nil) ("!" "\\note{%s}" nil) ("~"
>> "\\verb" t))))
>>
>
>> However, the definitions of "@" and "!" do not seem to take effect at
>> all.
> Could you please change the characters avoiding "@" "!" ?
> (I know there is not much choice of characters that can be used as
> "emphasis delimiters" )
>
> But I think that "@" "!" does interfere with some regexp:
> e.g.  "@" is used in the HTML export.
>
> cheers,
> Giovanni
>



-- 
Gaurav Sharma                   Ph (585)-275-7313(Office)
Assoc Professor, ECE Department Fax. (585)-273-4919
Director, Center for Emerging and Innovative Sciences (CEIS)
Hopeman 417, RCBox 270126, University of Rochester, Rochester, NY 14627-0126
gaurav.sharma@rochester.edu
http://www.ece.rochester.edu/~gsharma

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-06-29 17:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-28  0:04 Org Mode Latex Export Customization of org-export-latex-emphasis-alist Gaurav Sharma
2010-06-29 11:11 ` Giovanni Ridolfi
2010-06-29 11:29   ` Giovanni Ridolfi
2010-06-29 17:57   ` Gaurav Sharma

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).