* Re: HTML + RDFa export/publishing ?
2015-04-15 17:14 ` John Kitchin
@ 2015-04-16 15:26 ` Phillip Lord
2015-04-17 9:04 ` Olivier Berger
2015-04-17 8:59 ` Olivier Berger
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Phillip Lord @ 2015-04-16 15:26 UTC (permalink / raw)
To: John Kitchin; +Cc: Olivier Berger, emacs-orgmode@gnu.org
I've been thinking the same recently. For me, I was interested in
supporting RASH which is HTML+RDFa.
http://cs.unibo.it/save-sd/rash/documentation/index.html
Would be nice to have an org-mode for scientific communication tool.
Publishing an Emacs paper would be kind of fun also.
Phil
John Kitchin <jkitchin@andrew.cmu.edu> writes:
> Can you give us an example of what you are trying to do? I don't think
> org-mode supports this rich of behavior out of the box, but see
> http://kitchingroup.cheme.cmu.edu/blog/2015/02/05/Extending-the-org-mode-link-syntax-with-attributes/
> for an example idea of what you could imagine doing with a link type
> approach that could be inline with text.
>
> John
>
> -----------------------------------
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
>
>
> On Wed, Apr 15, 2015 at 11:02 AM, Olivier Berger <
> olivier.berger@telecom-sudparis.eu> wrote:
>
>> Hi.
>>
>> I'd like to create a publishing project to export HTML pages, and I'd
>> like to use org-mode syntax for authoring, and I'd like to embed RDFa
>> meta-data inside the generated HTML.
>>
>> I'm wondering if anyone has investigated a mean in org-mode to embed
>> such meta-data.
>>
>> I kinda imagine properties may be used for this, but I'm not so much
>> familiar with using org-mode for storing structured data...
>>
>> Maybe POSH is the answer, but org-mode syntax and editing modes are so
>> cool ;)
>>
>> Thanks in advance.
>>
>> Best regards,
>> --
>> Olivier BERGER
>> http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id:
>> 2048R/5819D7E8
>> Ingenieur Recherche - Dept INF
>> Institut Mines-Telecom, Telecom SudParis, Evry (France)
>>
>>
>>
--
Phillip Lord, Phone: +44 (0) 191 208 7827
Lecturer in Bioinformatics, Email: phillip.lord@newcastle.ac.uk
School of Computing Science, http://homepages.cs.ncl.ac.uk/phillip.lord
Room 914 Claremont Tower, skype: russet_apples
Newcastle University, twitter: phillord
NE1 7RU
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: HTML + RDFa export/publishing ?
2015-04-15 17:14 ` John Kitchin
2015-04-16 15:26 ` Phillip Lord
@ 2015-04-17 8:59 ` Olivier Berger
2015-04-18 16:30 ` John Kitchin
2015-04-20 7:36 ` Olivier Berger
2015-04-20 13:08 ` Olivier Berger
2015-04-21 11:36 ` Olivier Berger
3 siblings, 2 replies; 12+ messages in thread
From: Olivier Berger @ 2015-04-17 8:59 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
Hi.
John Kitchin <jkitchin@andrew.cmu.edu> writes:
> Can you give us an example of what you are trying to do?
For instance, I'd like to link my WebID to publications of mine in a
semantic way, using dcterm or FOAF vocabularies.
This is done as RDFa by using links like :
<p><span about="#me" rel="foaf:homepage">The canonical address of my
homepage is at <a
href="http://example.com/~bob/">http://example.com/~bob/</a></span>
This would ideally be encoded in org in a way that is more compact than
this construct ;)
> I don't think
> org-mode supports this rich of behavior out of the box, but see
> http://kitchingroup.cheme.cmu.edu/blog/2015/02/05/Extending-the-org-mode-link-syntax-with-attributes/
> for an example idea of what you could imagine doing with a link type
> approach that could be inline with text.
>
Yes, this looks interesting.
Ideally, a mix of org-mode and Turtle [0] could be great, as Turtle
seems the most human-friendly way to write RDF.
In Turtle, the relation above is described with :
<#me>
foaf:homepage <http://example.com/~bob/> .
for instance.
So I don't know exactly how both could be mixed...
It's hard to think about a compact notation that would allow decorating
org-mode stuff with RDF properties or relations on the fly...
Hope this makes sense (at least for the Semantic Web aware fools ;).
Best regards,
[0] http://www.w3.org/TR/turtle/
--
Olivier BERGER
http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
Ingenieur Recherche - Dept INF
Institut Mines-Telecom, Telecom SudParis, Evry (France)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: HTML + RDFa export/publishing ?
2015-04-17 8:59 ` Olivier Berger
@ 2015-04-18 16:30 ` John Kitchin
2015-04-20 7:36 ` Olivier Berger
1 sibling, 0 replies; 12+ messages in thread
From: John Kitchin @ 2015-04-18 16:30 UTC (permalink / raw)
To: Olivier Berger; +Cc: emacs-orgmode@gnu.org
You might find some inspiration with something like this:
http://oremacs.com/2015/01/23/eltex/
or
http://jkcunningham.com/cl-who-ext.html
The basic issue I see is 1) how to represent your data structure so that
it is 2) human readable, 3) machine parseable (by you), and 4) the data
is easily reformatted. For me that means data represented in lisp
structures or json, which are easy to write, relatively easy to read,
and there are standard libraries for parsing them. Once parsed,
reformatting during export is usually not too hard.
A totally alternative approach is currently underway with the new
citation syntax, where a new built in syntax for org-mode is being
developed. That is out of my league though ;)
Olivier Berger writes:
> Hi.
>
> John Kitchin <jkitchin@andrew.cmu.edu> writes:
>
>> Can you give us an example of what you are trying to do?
>
> For instance, I'd like to link my WebID to publications of mine in a
> semantic way, using dcterm or FOAF vocabularies.
>
> This is done as RDFa by using links like :
> <p><span about="#me" rel="foaf:homepage">The canonical address of my
> homepage is at <a
> href="http://example.com/~bob/">http://example.com/~bob/</a></span>
>
> This would ideally be encoded in org in a way that is more compact than
> this construct ;)
>
>> I don't think
>> org-mode supports this rich of behavior out of the box, but see
>> http://kitchingroup.cheme.cmu.edu/blog/2015/02/05/Extending-the-org-mode-link-syntax-with-attributes/
>> for an example idea of what you could imagine doing with a link type
>> approach that could be inline with text.
>>
>
> Yes, this looks interesting.
>
> Ideally, a mix of org-mode and Turtle [0] could be great, as Turtle
> seems the most human-friendly way to write RDF.
>
> In Turtle, the relation above is described with :
> <#me>
> foaf:homepage <http://example.com/~bob/> .
>
> for instance.
>
> So I don't know exactly how both could be mixed...
>
> It's hard to think about a compact notation that would allow decorating
> org-mode stuff with RDF properties or relations on the fly...
>
> Hope this makes sense (at least for the Semantic Web aware fools ;).
>
> Best regards,
>
> [0] http://www.w3.org/TR/turtle/
--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: HTML + RDFa export/publishing ?
2015-04-17 8:59 ` Olivier Berger
2015-04-18 16:30 ` John Kitchin
@ 2015-04-20 7:36 ` Olivier Berger
2015-04-20 15:44 ` Thomas S. Dye
1 sibling, 1 reply; 12+ messages in thread
From: Olivier Berger @ 2015-04-20 7:36 UTC (permalink / raw)
To: emacs-orgmode
Hi.
Olivier Berger <olivier.berger@telecom-sudparis.eu> writes:
> Hi.
>
> John Kitchin <jkitchin@andrew.cmu.edu> writes:
>
>> Can you give us an example of what you are trying to do?
>
> For instance, I'd like to link my WebID to publications of mine in a
> semantic way, using dcterm or FOAF vocabularies.
>
> This is done as RDFa by using links like :
> <p><span about="#me" rel="foaf:homepage">The canonical address of my
> homepage is at <a
> href="http://example.com/~bob/">http://example.com/~bob/</a></span>
>
> This would ideally be encoded in org in a way that is more compact than
> this construct ;)
FYI, I've managed to render this by using the following approach :
@@html:<span about="#me" rel="foaf:homepage">@@The canonical address of my
homepage is at [[http://example.com/~bob/]]@@html:@@</span>@@
But this is not exactly compact, and suffers from inability of the
emancs org mode to colorize or mask the @@html: @@ constructs :-/
I'm still researching a more usable solution.
Best regards,
--
Olivier BERGER
http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
Ingenieur Recherche - Dept INF
Institut Mines-Telecom, Telecom SudParis, Evry (France)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: HTML + RDFa export/publishing ?
2015-04-20 7:36 ` Olivier Berger
@ 2015-04-20 15:44 ` Thomas S. Dye
0 siblings, 0 replies; 12+ messages in thread
From: Thomas S. Dye @ 2015-04-20 15:44 UTC (permalink / raw)
To: Olivier Berger; +Cc: emacs-orgmode
Aloha,
Olivier Berger <olivier.berger@telecom-sudparis.eu> writes:
> Hi.
>
> Olivier Berger <olivier.berger@telecom-sudparis.eu> writes:
>
>> Hi.
>>
>> John Kitchin <jkitchin@andrew.cmu.edu> writes:
>>
>>> Can you give us an example of what you are trying to do?
>>
>> For instance, I'd like to link my WebID to publications of mine in a
>> semantic way, using dcterm or FOAF vocabularies.
>>
>> This is done as RDFa by using links like :
>> <p><span about="#me" rel="foaf:homepage">The canonical address of my
>> homepage is at <a
>> href="http://example.com/~bob/">http://example.com/~bob/</a></span>
>>
>> This would ideally be encoded in org in a way that is more compact than
>> this construct ;)
>
> FYI, I've managed to render this by using the following approach :
>
> @@html:<span about="#me" rel="foaf:homepage">@@The canonical address of my
> homepage is at [[http://example.com/~bob/]]@@html:@@</span>@@
>
> But this is not exactly compact, and suffers from inability of the
> emancs org mode to colorize or mask the @@html: @@ constructs :-/
>
> I'm still researching a more usable solution.
Would a macro do what you want?
#+MACRO: rdfa @@html:<span about="$1" rel="$2">@@$3@@html:@@</span>@@
{{{rdfa(#me, foaf:homepage, The canonical address of my homepage is at
[[http://example.com/~bob/]])}}}
Untested.
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: HTML + RDFa export/publishing ?
2015-04-15 17:14 ` John Kitchin
2015-04-16 15:26 ` Phillip Lord
2015-04-17 8:59 ` Olivier Berger
@ 2015-04-20 13:08 ` Olivier Berger
2015-04-20 17:04 ` John Kitchin
2015-04-21 11:36 ` Olivier Berger
3 siblings, 1 reply; 12+ messages in thread
From: Olivier Berger @ 2015-04-20 13:08 UTC (permalink / raw)
To: John Kitchin; +Cc: emacs-orgmode@gnu.org
Hi.
John Kitchin <jkitchin@andrew.cmu.edu> writes:
> Can you give us an example of what you are trying to do? I don't think
> org-mode supports this rich of behavior out of the box, but see
> http://kitchingroup.cheme.cmu.edu/blog/2015/02/05/Extending-the-org-mode-link-syntax-with-attributes/
> for an example idea of what you could imagine doing with a link type
> approach that could be inline with text.
>
I've tried applying your link type approach, but (as reported in the
blog comments too), I get :
\nil[nil][nil]{kitchin-2010}
instead of the expected :
\cite[See for example][page 47]{kitchin-2010}
Any clue what's wrong ?
Best regards,
--
Olivier BERGER
http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
Ingenieur Recherche - Dept INF
Institut Mines-Telecom, Telecom SudParis, Evry (France)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: HTML + RDFa export/publishing ?
2015-04-15 17:14 ` John Kitchin
` (2 preceding siblings ...)
2015-04-20 13:08 ` Olivier Berger
@ 2015-04-21 11:36 ` Olivier Berger
2015-04-21 20:17 ` John Kitchin
3 siblings, 1 reply; 12+ messages in thread
From: Olivier Berger @ 2015-04-21 11:36 UTC (permalink / raw)
To: John Kitchin; +Cc: emacs-orgmode@gnu.org
Hi.
I've finally devoted a bit more time to follow the lines you'd drawn in
the post below, and here's the result :
http://www-public.telecom-sudparis.eu/~berger_o/test-org-publishing-rdfa.html
It's not perfect as it doesn't offer a universal compact way to map all
RDFa constructs to some handy and compact org syntax, but given a small
number of patterns, and the corresponding elisp converter code, I think
it achieves a quite interesting solution.
Many thanks for the suggestion.
Also, any comments much welcome (and yes, my lisp is ugly ;).
Best regards,
John Kitchin <jkitchin@andrew.cmu.edu> writes:
> Can you give us an example of what you are trying to do? I don't think
> org-mode supports this rich of behavior out of the box, but see
> http://kitchingroup.cheme.cmu.edu/blog/2015/02/05/Extending-the-org-mode-link-syntax-with-attributes/
> for an example idea of what you could imagine doing with a link type
> approach that could be inline with text.
>
--
Olivier BERGER
http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
Ingenieur Recherche - Dept INF
Institut Mines-Telecom, Telecom SudParis, Evry (France)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: HTML + RDFa export/publishing ?
2015-04-21 11:36 ` Olivier Berger
@ 2015-04-21 20:17 ` John Kitchin
0 siblings, 0 replies; 12+ messages in thread
From: John Kitchin @ 2015-04-21 20:17 UTC (permalink / raw)
To: Olivier Berger; +Cc: emacs-orgmode@gnu.org
your code doesn't look any uglier than mine ;)
You could replace many of your (if ) constructs with (when ) since there
is no else clause, but your (if ) constructs work just fine.
Olivier Berger writes:
> Hi.
>
> I've finally devoted a bit more time to follow the lines you'd drawn in
> the post below, and here's the result :
>
> http://www-public.telecom-sudparis.eu/~berger_o/test-org-publishing-rdfa.html
>
> It's not perfect as it doesn't offer a universal compact way to map all
> RDFa constructs to some handy and compact org syntax, but given a small
> number of patterns, and the corresponding elisp converter code, I think
> it achieves a quite interesting solution.
>
> Many thanks for the suggestion.
>
> Also, any comments much welcome (and yes, my lisp is ugly ;).
>
> Best regards,
>
> John Kitchin <jkitchin@andrew.cmu.edu> writes:
>
>> Can you give us an example of what you are trying to do? I don't think
>> org-mode supports this rich of behavior out of the box, but see
>> http://kitchingroup.cheme.cmu.edu/blog/2015/02/05/Extending-the-org-mode-link-syntax-with-attributes/
>> for an example idea of what you could imagine doing with a link type
>> approach that could be inline with text.
>>
--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
^ permalink raw reply [flat|nested] 12+ messages in thread