* Markup for export question
@ 2009-07-09 13:19 Ulf Stegemann
2009-07-09 15:38 ` Sebastian Rose
2009-07-09 15:59 ` Sebastian Rose
0 siblings, 2 replies; 6+ messages in thread
From: Ulf Stegemann @ 2009-07-09 13:19 UTC (permalink / raw)
To: emacs-orgmode
When writing documentations I often come across expressions like
doMagic('myVariable')
In an ideal world the HTML code for this after exporting the org file
would look like this:
<code>doMagic('<var>myVariable</var>')</code>
The purpose is of course to indicate that `doMagic' is a literal
function/method name while `myVariable' is not meant literal and is to
be replaced something more or less sensible.
However, I find that rather hard to achieve and was only able to produce
this with quoted HTML tags. In order to find a simpler solution I was
fiddling with `org-emphasis-alist' and `org-emphasis-regexp-components'
but to no avail. Does anybody have an idea how to create that HTML code
from a simple markup in an org file? BTW: Same applies probably for
LaTeX export but I haven't been playing around with this.
Ulf
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Markup for export question
2009-07-09 13:19 Markup for export question Ulf Stegemann
@ 2009-07-09 15:38 ` Sebastian Rose
2009-07-09 17:47 ` Sebastian Rose
2009-07-09 15:59 ` Sebastian Rose
1 sibling, 1 reply; 6+ messages in thread
From: Sebastian Rose @ 2009-07-09 15:38 UTC (permalink / raw)
To: Ulf Stegemann; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 303 bytes --]
Ulf Stegemann <ulf-news@zeitform.de> writes:
> When writing documentations I often come across expressions like
>
> doMagic('myVariable')
>
> In an ideal world the HTML code for this after exporting the org file
> would look like this:
>
> <code>doMagic('<var>myVariable</var>')</code>
Example:
[-- Attachment #2: Type: text/plain, Size: 123 bytes --]
#+MACRO: macname (eval (format "Macro says '%s'" $1))
* Some headline
{{{macname("Something to say here")}}}
[-- Attachment #3: Type: text/plain, Size: 111 bytes --]
It does _not_ work without the `eval'.
See:
http://orgmode.org/Changes.html#sec-2.1.1
Sebastian
[-- Attachment #4: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: 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] 6+ messages in thread
* Re: Markup for export question
2009-07-09 15:38 ` Sebastian Rose
@ 2009-07-09 17:47 ` Sebastian Rose
0 siblings, 0 replies; 6+ messages in thread
From: Sebastian Rose @ 2009-07-09 17:47 UTC (permalink / raw)
To: Ulf Stegemann; +Cc: emacs-orgmode
Sebastian Rose <sebastian_rose@gmx.de> writes:
> Ulf Stegemann <ulf-news@zeitform.de> writes:
>> When writing documentations I often come across expressions like
>>
>> doMagic('myVariable')
>>
>> In an ideal world the HTML code for this after exporting the org file
>> would look like this:
>>
>> <code>doMagic('<var>myVariable</var>')</code>
>
>
> Example:
>
>
> #+MACRO: macname (eval (format "Macro says '%s'" $1))
>
> * Some headline
>
> {{{macname("Something to say here")}}}
>
>
>
> It does _not_ work without the `eval'.
>
>
>
> See:
>
> http://orgmode.org/Changes.html#sec-2.1.1
>
Can someone here tell me, what I read when looking at the OP's email?
This works, but not in #+BEGIN_SRC or ` : ' protected:
@<code>doMagic('@<var>myVariable@</var>')@<code>
Sebastian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Markup for export question
2009-07-09 13:19 Markup for export question Ulf Stegemann
2009-07-09 15:38 ` Sebastian Rose
@ 2009-07-09 15:59 ` Sebastian Rose
1 sibling, 0 replies; 6+ messages in thread
From: Sebastian Rose @ 2009-07-09 15:59 UTC (permalink / raw)
To: Ulf Stegemann; +Cc: emacs-orgmode
Haha, just for the fun of it: While trying to document this via
Org-mode, I had to define this macro here:
#+MACRO: macro {{{$1}}}
* Predefined Macros
* ={{{macro(date(TIME_FORMAT_STRING))}}}=
* ={{{macro(modification-time(TIME_FORMAT_STRING))}}}=
* ={{{macro(time(TIME_FORMAT_STRING))}}}=
* ={{{macro(input-file)}}}=
Sebastian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Markup for export question
@ 2009-07-09 15:09 Giovanni Ridolfi
2009-07-10 7:35 ` Ulf Stegemann
0 siblings, 1 reply; 6+ messages in thread
From: Giovanni Ridolfi @ 2009-07-09 15:09 UTC (permalink / raw)
To: emacs-orgmode, Ulf Stegemann
--- Gio 9/7/09, Ulf Stegemann <ulf-news@zeitform.de> ha scritto:
> When writing documentations I often
> come across expressions like
>
> doMagic('myVariable')
>
> In an ideal world the HTML code for this after exporting
> the org file
> would look like this:
>
>
> <code>doMagic('<var>myVariable</var>')</code>
>
> The purpose is of course to indicate that `doMagic' is a
> literal
> function/method name while `myVariable' is not meant
> literal and is to
> be replaced something more or less sensible.
>
... did you play with "Literal examples",
chapter 12.1 of the manual?
or "12.6.6 Text areas" ?
cheers,
Giovanni
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Markup for export question
2009-07-09 15:09 Giovanni Ridolfi
@ 2009-07-10 7:35 ` Ulf Stegemann
0 siblings, 0 replies; 6+ messages in thread
From: Ulf Stegemann @ 2009-07-10 7:35 UTC (permalink / raw)
To: emacs-orgmode
Hi Giovanni,
Giovanni Ridolfi <giovanni.ridolfi@yahoo.it> wrote:
> --- Gio 9/7/09, Ulf Stegemann <ulf-news@zeitform.de> ha scritto:
>> When writing documentations I often
>> come across expressions like
>>
>> doMagic('myVariable')
>>
>> In an ideal world the HTML code for this after exporting the org file
>> would look like this:
>>
>> <code>doMagic('<var>myVariable</var>')</code>
>>
>> The purpose is of course to indicate that `doMagic' is a literal
>> function/method name while `myVariable' is not meant literal and is
>> to be replaced something more or less sensible.
>
> ... did you play with "Literal examples", chapter 12.1 of the manual?
>
> or "12.6.6 Text areas" ?
yes, I'm aware of those but I was rather referring to inline markup not
src/example blocks. To make it clearer, imagine something like this:
Copy your configuration to /install-dir/conf.
Which ideally would be exported as
Copy your configuration to <code>/<var>install-dir</var>/conf</code>.
This is something where a src/example block is not suitable.
Ulf
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-07-10 7:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-09 13:19 Markup for export question Ulf Stegemann
2009-07-09 15:38 ` Sebastian Rose
2009-07-09 17:47 ` Sebastian Rose
2009-07-09 15:59 ` Sebastian Rose
-- strict thread matches above, loose matches on Subject: below --
2009-07-09 15:09 Giovanni Ridolfi
2009-07-10 7:35 ` Ulf Stegemann
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.