* [org-beamer] \alert
@ 2010-01-24 19:10 Sven Bretfeld
2010-01-25 10:58 ` Eric S Fraga
0 siblings, 1 reply; 14+ messages in thread
From: Sven Bretfeld @ 2010-01-24 19:10 UTC (permalink / raw)
To: emacs-org
Hi
Is there any Symbol in org-beamer for \alert{Text}? In presentations
\alert is recommended instead of italics. We could even think of
translating text enclosed in slashes / ... / to \alert{} by default in
the beamer class.
Anyway, thanks to all developers for this very useful new addon.
Greetings
Sven
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [org-beamer] \alert
2010-01-24 19:10 [org-beamer] \alert Sven Bretfeld
@ 2010-01-25 10:58 ` Eric S Fraga
2010-01-25 16:55 ` Sven Bretfeld
2010-01-26 15:06 ` Sébastien Vauban
0 siblings, 2 replies; 14+ messages in thread
From: Eric S Fraga @ 2010-01-25 10:58 UTC (permalink / raw)
To: org-mode mailing list
(mistakenly sent this only to the OP... resending to list as well)
At 24 Jan 2010 20:10:03 +0100,
Sven Bretfeld wrote:
>
> Hi
>
> Is there any Symbol in org-beamer for \alert{Text}? In presentations
> \alert is recommended instead of italics. We could even think of
> translating text enclosed in slashes / ... / to \alert{} by default in
> the beamer class.
There was a long discussion about this back in November on this
mailing list. Essentially, you can add this functionality yourself:
--8<---------------cut here---------------start------------->8---
(setq org-emphasis-alist (quote (("*" bold "<b>" "</b>")
("/" italic "<i>" "</i>")
("_" underline "<span style=\"text-decoration:underline;\">" "</span>")
("=" org-code "<code>" "</code>" verbatim)
("~" org-verbatim "<code>" "</code>" verbatim)
("+" (:strike-through t) "<del>" "</del>")
("@" org-warning "<b>" "</b>")))
org-export-latex-emphasis-alist (quote
(("*" "\\textbf{%s}" nil)
("/" "\\emph{%s}" nil)
("_" "\\underline{%s}" nil)
("+" "\\texttt{%s}" nil)
("=" "\\verb=%s=" nil)
("~" "\\verb~%s~" t)
("@" "\\alert{%s}" nil)))
)
--8<---------------cut here---------------end--------------->8---
Note the last entry in each of these variables; the other elements in
each are their default values.
HTH,
eric
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [org-beamer] \alert
2010-01-25 10:58 ` Eric S Fraga
@ 2010-01-25 16:55 ` Sven Bretfeld
2010-01-26 15:06 ` Sébastien Vauban
1 sibling, 0 replies; 14+ messages in thread
From: Sven Bretfeld @ 2010-01-25 16:55 UTC (permalink / raw)
To: Eric S Fraga; +Cc: org-mode mailing list
Hello Eric
Eric S Fraga <ucecesf@ucl.ac.uk> writes:
> There was a long discussion about this back in November on this
> mailing list.
Oh sorry, I have missed that.
> Essentially, you can add this functionality yourself:
Thank you,
Sven
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [org-beamer] \alert
2010-01-25 10:58 ` Eric S Fraga
2010-01-25 16:55 ` Sven Bretfeld
@ 2010-01-26 15:06 ` Sébastien Vauban
2010-01-26 16:22 ` Eric S Fraga
1 sibling, 1 reply; 14+ messages in thread
From: Sébastien Vauban @ 2010-01-26 15:06 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Eric and Sven,
Eric S Fraga wrote:
> (mistakenly sent this only to the OP... resending to list as well)
>
> At 24 Jan 2010 20:10:03 +0100,
> Sven Bretfeld wrote:
>>
>> Is there any Symbol in org-beamer for \alert{Text}? In presentations \alert
>> is recommended instead of italics. We could even think of translating text
>> enclosed in slashes / ... / to \alert{} by default in the beamer class.
>
> Essentially, you can add this functionality yourself:
>
> (setq org-emphasis-alist (quote (("*" bold "<b>" "</b>")
> ("/" italic "<i>" "</i>")
> ("_" underline "<span style=\"text-decoration:underline;\">" "</span>")
> ("=" org-code "<code>" "</code>" verbatim)
> ("~" org-verbatim "<code>" "</code>" verbatim)
> ("+" (:strike-through t) "<del>" "</del>")
> ("@" org-warning "<b>" "</b>")))
> org-export-latex-emphasis-alist (quote
> (("*" "\\textbf{%s}" nil)
> ("/" "\\emph{%s}" nil)
> ("_" "\\underline{%s}" nil)
> ("+" "\\texttt{%s}" nil)
> ("=" "\\verb=%s=" nil)
> ("~" "\\verb~%s~" t)
> ("@" "\\alert{%s}" nil))))
>
That's what I'm using as well, but the problem is that it's not compatible
anymore with non-beamer LaTeX, the alert macro being unknown.
Would there be a way to conditionally translate @...@ to alert (if beamer) or
to emph (if not-beamer), so that we can still easily compile a document to one
or the other LaTeX "back-end", without having to customize variables in Emacs,
prior to a compilation to the other "back-end"?
I must admit I do not have clear specifications on how to tell Org about such
a config...
Best regards,
Seb
--
Sébastien Vauban
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Re: [org-beamer] \alert
2010-01-26 15:06 ` Sébastien Vauban
@ 2010-01-26 16:22 ` Eric S Fraga
2010-01-28 17:58 ` Carsten Dominik
0 siblings, 1 reply; 14+ messages in thread
From: Eric S Fraga @ 2010-01-26 16:22 UTC (permalink / raw)
To: Sébastien Vauban; +Cc: emacs-orgmode
At Tue, 26 Jan 2010 16:06:27 +0100,
Sébastien Vauban wrote:
> Eric S Fraga wrote:
> > At 24 Jan 2010 20:10:03 +0100,
> > Sven Bretfeld wrote:
> >>
> >> Is there any Symbol in org-beamer for \alert{Text}? In presentations \alert
[...]
> > org-export-latex-emphasis-alist (quote
> > (("*" "\\textbf{%s}" nil)
> > ("/" "\\emph{%s}" nil)
> > ("_" "\\underline{%s}" nil)
> > ("+" "\\texttt{%s}" nil)
> > ("=" "\\verb=%s=" nil)
> > ("~" "\\verb~%s~" t)
> > ("@" "\\alert{%s}" nil))))
> >
>
> That's what I'm using as well, but the problem is that it's not compatible
> anymore with non-beamer LaTeX, the alert macro being unknown.
Very true. I've never thought about this as my presentations are for
presentation only etc. However, it would definitely be nice to have a
more general solution.
> Would there be a way to conditionally translate @...@ to alert (if beamer) or
> to emph (if not-beamer), so that we can still easily compile a document to one
> or the other LaTeX "back-end", without having to customize variables in Emacs,
> prior to a compilation to the other "back-end"?
The alist structure doesn't allow for embedded lisp code, as far as I
can tell. It would obviously be easier if this structure could be
evaluated on the fly.
> I must admit I do not have clear specifications on how to tell Org about such
> a config...
The only suggestion I can come up with would be to modify this
variable using, for instance, the org-export-later-after-initial-vars-hook?
eric
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Re: [org-beamer] \alert
2010-01-26 16:22 ` Eric S Fraga
@ 2010-01-28 17:58 ` Carsten Dominik
2010-01-29 9:40 ` Eric S Fraga
2010-02-03 8:31 ` Karsten Heymann
0 siblings, 2 replies; 14+ messages in thread
From: Carsten Dominik @ 2010-01-28 17:58 UTC (permalink / raw)
To: e.fraga; +Cc: Sébastien Vauban, emacs-orgmode
On Jan 26, 2010, at 5:22 PM, Eric S Fraga wrote:
> At Tue, 26 Jan 2010 16:06:27 +0100,
> Sébastien Vauban wrote:
>> Eric S Fraga wrote:
>>> At 24 Jan 2010 20:10:03 +0100,
>>> Sven Bretfeld wrote:
>>>>
>>>> Is there any Symbol in org-beamer for \alert{Text}? In
>>>> presentations \alert
>
> [...]
>
>>> org-export-latex-emphasis-alist (quote
>>> (("*" "\\textbf{%s}" nil)
>>> ("/" "\\emph{%s}" nil)
>>> ("_" "\\underline{%s}" nil)
>>> ("+" "\\texttt{%s}" nil)
>>> ("=" "\\verb=%s=" nil)
>>> ("~" "\\verb~%s~" t)
>>> ("@" "\\alert{%s}" nil))))
>>>
>>
>> That's what I'm using as well, but the problem is that it's not
>> compatible
>> anymore with non-beamer LaTeX, the alert macro being unknown.
>
> Very true. I've never thought about this as my presentations are for
> presentation only etc. However, it would definitely be nice to have a
> more general solution.
>
>> Would there be a way to conditionally translate @...@ to alert (if
>> beamer) or
>> to emph (if not-beamer), so that we can still easily compile a
>> document to one
>> or the other LaTeX "back-end", without having to customize
>> variables in Emacs,
>> prior to a compilation to the other "back-end"?
>
> The alist structure doesn't allow for embedded lisp code, as far as I
> can tell. It would obviously be easier if this structure could be
> evaluated on the fly.
>
>> I must admit I do not have clear specifications on how to tell Org
>> about such
>> a config...
>
> The only suggestion I can come up with would be to modify this
> variable using, for instance, the org-export-later-after-initial-
> vars-hook?
Is there a LaTeX command that can figure out if it is running a beamer
class?
If yes, a possible solution would be to redefine \alert in LaTeX when
not doing BEAMER.
- Carsten
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Re: [org-beamer] \alert
2010-01-28 17:58 ` Carsten Dominik
@ 2010-01-29 9:40 ` Eric S Fraga
2010-01-29 11:26 ` Tim Burt
2010-02-03 8:31 ` Karsten Heymann
1 sibling, 1 reply; 14+ messages in thread
From: Eric S Fraga @ 2010-01-29 9:40 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Sébastien Vauban, emacs-orgmode
At Thu, 28 Jan 2010 18:58:38 +0100,
Carsten Dominik wrote:
[...]
>
> Is there a LaTeX command that can figure out if it is running a beamer
> class?
> If yes, a possible solution would be to redefine \alert in LaTeX when
> not doing BEAMER.
>
> - Carsten
>
This must be possible but my latex (and tex) programming capabilities
are even worse than my elisp... :(
For any LaTeX expert out there, is there an easy way to determine
whether a particular macro has been defined? If so, we wouldn't even
need to check for beamer, simply for \alert.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Re: [org-beamer] \alert
2010-01-29 9:40 ` Eric S Fraga
@ 2010-01-29 11:26 ` Tim Burt
2010-01-29 12:23 ` Eric S Fraga
0 siblings, 1 reply; 14+ messages in thread
From: Tim Burt @ 2010-01-29 11:26 UTC (permalink / raw)
To: e.fraga; +Cc: Sébastien Vauban, emacs-orgmode, Carsten Dominik
Eric S Fraga writes:
> At Thu, 28 Jan 2010 18:58:38 +0100,
> Carsten Dominik wrote:
>
> [...]
>
> >
> > Is there a LaTeX command that can figure out if it is running a beamer
> > class?
> > If yes, a possible solution would be to redefine \alert in LaTeX when
> > not doing BEAMER.
> >
> > - Carsten
> >
>
> This must be possible but my latex (and tex) programming capabilities
> are even worse than my elisp... :(
>
> For any LaTeX expert out there, is there an easy way to determine
> whether a particular macro has been defined? If so, we wouldn't even
> need to check for beamer, simply for \alert.
Use the
\ifx<command>\undefined ... \else ... \fi
construct to determine if a command already exists, and then to take
action in the appropriate case. Test the example below both as-is and
with the first ~\newcommand*{\thisalert}~ commented out to see the
different results.
: \documentclass{article}
: \newcommand*{\thisalert}{Do this.}
: % Test for existence of \thisalert.
: % Create or modify the command accordingly.
: \ifx\thisalert\undefined%
: \newcommand*{\thisalert}{Do that.}%
: \else%
: \renewcommand*{\thisalert}{Do this differently.}
: \fi
: \begin{document}
:
: \thisalert
:
: \end{document}
I hope this is of use,
Tim
>
>
> _______________________________________________
> 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
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Re: [org-beamer] \alert
2010-01-29 11:26 ` Tim Burt
@ 2010-01-29 12:23 ` Eric S Fraga
2010-01-29 15:36 ` Sébastien Vauban
0 siblings, 1 reply; 14+ messages in thread
From: Eric S Fraga @ 2010-01-29 12:23 UTC (permalink / raw)
To: tcburt; +Cc: emacs-orgmode, n Vauban, Carsten Dominik
At Fri, 29 Jan 2010 06:26:21 -0500,
Tim Burt wrote:
> Eric S Fraga writes:
> > For any LaTeX expert out there, is there an easy way to determine
> > whether a particular macro has been defined? If so, we wouldn't even
> > need to check for beamer, simply for \alert.
>
> Use the
> \ifx<command>\undefined ... \else ... \fi
> construct to determine if a command already exists, and then to take
> action in the appropriate case. Test the example below both as-is and
> with the first ~\newcommand*{\thisalert}~ commented out to see the
> different results.
[...]
> I hope this is of use,
> Tim
Thanks Tim. Very helpful indeed!
The following org-mode line does the job for me:
#+latex_header: \ifx\alert\undefined\let\alert\textbf\fi
If \alert is not defined, I have =alert= behave as =textbf=.
Alternatively, something like this also works:
#+latex_header: \ifx\alert\undefined\newcommand*{\alert}[1]{\textbf{#1}}\fi
in case one wants more control (e.g. could also change the colour to red).
eric
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [org-beamer] \alert
2010-01-29 12:23 ` Eric S Fraga
@ 2010-01-29 15:36 ` Sébastien Vauban
2010-02-01 16:18 ` Carsten Dominik
0 siblings, 1 reply; 14+ messages in thread
From: Sébastien Vauban @ 2010-01-29 15:36 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Eric, Tim, Carsten and all,
Eric S Fraga wrote:
> At Fri, 29 Jan 2010 06:26:21 -0500, Tim Burt wrote:
>> Eric S Fraga writes:
>>> For any LaTeX expert out there, is there an easy way to determine whether
>>> a particular macro has been defined? If so, we wouldn't even need to check
>>> for beamer, simply for \alert.
>>
>> Use the
>> \ifx<command>\undefined ... \else ... \fi
>> construct to determine if a command already exists, and then to take action
>> in the appropriate case. Test the example below both as-is and with the
>> first ~\newcommand*{\thisalert}~ commented out to see the different
>> results.
Thanks to all. This is great stuff...
> The following org-mode line does the job for me:
>
> #+latex_header: \ifx\alert\undefined\let\alert\textbf\fi
>
> If \alert is not defined, I have =alert= behave as =textbf=.
Could this somehow made part of Org-mode, so that one does not need to repeat
this one-liner in every file that could be exported to pure LaTeX and/or
Beamer?
Best regards,
Seb
--
Sébastien Vauban
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Re: [org-beamer] \alert
2010-01-29 15:36 ` Sébastien Vauban
@ 2010-02-01 16:18 ` Carsten Dominik
0 siblings, 0 replies; 14+ messages in thread
From: Carsten Dominik @ 2010-02-01 16:18 UTC (permalink / raw)
To: Sébastien Vauban; +Cc: emacs-orgmode
On Jan 29, 2010, at 4:36 PM, Sébastien Vauban wrote:
> Hi Eric, Tim, Carsten and all,
>
> Eric S Fraga wrote:
>> At Fri, 29 Jan 2010 06:26:21 -0500, Tim Burt wrote:
>>> Eric S Fraga writes:
>>>> For any LaTeX expert out there, is there an easy way to determine
>>>> whether
>>>> a particular macro has been defined? If so, we wouldn't even need
>>>> to check
>>>> for beamer, simply for \alert.
>>>
>>> Use the
>>> \ifx<command>\undefined ... \else ... \fi
>>> construct to determine if a command already exists, and then to
>>> take action
>>> in the appropriate case. Test the example below both as-is and
>>> with the
>>> first ~\newcommand*{\thisalert}~ commented out to see the different
>>> results.
>
> Thanks to all. This is great stuff...
>
>
>> The following org-mode line does the job for me:
>>
>> #+latex_header: \ifx\alert\undefined\let\alert\textbf\fi
>>
>> If \alert is not defined, I have =alert= behave as =textbf=.
>
> Could this somehow made part of Org-mode, so that one does not need
> to repeat
> this one-liner in every file that could be exported to pure LaTeX
> and/or
> Beamer?
Yes - this is in there now. Let's see if someone complains.
- Carsten
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Re: [org-beamer] \alert
2010-01-28 17:58 ` Carsten Dominik
2010-01-29 9:40 ` Eric S Fraga
@ 2010-02-03 8:31 ` Karsten Heymann
2010-02-03 10:21 ` Carsten Dominik
1 sibling, 1 reply; 14+ messages in thread
From: Karsten Heymann @ 2010-02-03 8:31 UTC (permalink / raw)
To: emacs-orgmode
Hi,
i just catched up reading the org list, and I think I can contribute to
this:
Carsten Dominik <carsten.dominik@gmail.com> writes:
> Is there a LaTeX command that can figure out if it is running a beamer
> class?
> If yes, a possible solution would be to redefine \alert in LaTeX when
> not doing BEAMER.
The LaTeX Command \providecommand behaves exactly like \newcommand iff
the command does not already exist, so one (untested) solution would be
\providecommand{\alert}[1]{\emph{#1}}
I think this would be the cleanest way, but keep in mind that the
special <> beamer parameters are not supported by standard latex
command creation commands.
Yours
Karsten
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Re: [org-beamer] \alert
2010-02-03 8:31 ` Karsten Heymann
@ 2010-02-03 10:21 ` Carsten Dominik
2010-02-03 22:05 ` Sven Bretfeld
0 siblings, 1 reply; 14+ messages in thread
From: Carsten Dominik @ 2010-02-03 10:21 UTC (permalink / raw)
To: Karsten Heymann; +Cc: emacs-orgmode
This is also a very nice solution, thank you, I will be using it.
- Carsten
On Feb 3, 2010, at 9:31 AM, Karsten Heymann wrote:
> Hi,
>
> i just catched up reading the org list, and I think I can contribute
> to
> this:
>
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>> Is there a LaTeX command that can figure out if it is running a
>> beamer
>> class?
>> If yes, a possible solution would be to redefine \alert in LaTeX when
>> not doing BEAMER.
>
> The LaTeX Command \providecommand behaves exactly like \newcommand iff
> the command does not already exist, so one (untested) solution would
> be
>
> \providecommand{\alert}[1]{\emph{#1}}
>
> I think this would be the cleanest way, but keep in mind that the
> special <> beamer parameters are not supported by standard latex
> command creation commands.
>
> Yours
> Karsten
>
>
> _______________________________________________
> 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
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Re: [org-beamer] \alert
2010-02-03 10:21 ` Carsten Dominik
@ 2010-02-03 22:05 ` Sven Bretfeld
0 siblings, 0 replies; 14+ messages in thread
From: Sven Bretfeld @ 2010-02-03 22:05 UTC (permalink / raw)
To: emacs-orgmode
Hi all
I have been away for a week. Thanks for implementing this. Haven't tried
it yet.
Greetings
Sven
Carsten Dominik <carsten.dominik@gmail.com> writes:
> This is also a very nice solution, thank you, I will be using it.
>
> - Carsten
>
> On Feb 3, 2010, at 9:31 AM, Karsten Heymann wrote:
>
>> Hi,
>>
>> i just catched up reading the org list, and I think I can contribute
>> to
>> this:
>>
>> Carsten Dominik <carsten.dominik@gmail.com> writes:
>>> Is there a LaTeX command that can figure out if it is running a
>>> beamer
>>> class?
>>> If yes, a possible solution would be to redefine \alert in LaTeX when
>>> not doing BEAMER.
>>
>> The LaTeX Command \providecommand behaves exactly like \newcommand iff
>> the command does not already exist, so one (untested) solution would
>> be
>>
>> \providecommand{\alert}[1]{\emph{#1}}
>>
>> I think this would be the cleanest way, but keep in mind that the
>> special <> beamer parameters are not supported by standard latex
>> command creation commands.
>>
>> Yours
>> Karsten
>>
>>
>> _______________________________________________
>> 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
>
--
Mit freundlichen Grüßen
Sven Bretfeld
___________________________________
Prof. Dr. Sven Bretfeld
\ CEntrum für
CERES \ REligionswissenschaftliche
________\_Studien__________________
Ruhr-Universität Bochum
Universitätsstraße 150
D-44780 Bochum
http://www.ruhr-uni-bochum.de/ceres/de/organisation/beteiligte/sven_bretfeld.html
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2010-02-03 22:04 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-24 19:10 [org-beamer] \alert Sven Bretfeld
2010-01-25 10:58 ` Eric S Fraga
2010-01-25 16:55 ` Sven Bretfeld
2010-01-26 15:06 ` Sébastien Vauban
2010-01-26 16:22 ` Eric S Fraga
2010-01-28 17:58 ` Carsten Dominik
2010-01-29 9:40 ` Eric S Fraga
2010-01-29 11:26 ` Tim Burt
2010-01-29 12:23 ` Eric S Fraga
2010-01-29 15:36 ` Sébastien Vauban
2010-02-01 16:18 ` Carsten Dominik
2010-02-03 8:31 ` Karsten Heymann
2010-02-03 10:21 ` Carsten Dominik
2010-02-03 22:05 ` Sven Bretfeld
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).