CSL Editor in Mendeley Desktop 1.7

Hi,

I think that this could interest some people here: Mendeley Desktop
1.7 has the CSL Editor integrated.

If you want to see it: download/update Mendeley Desktop 1.7 (
http://www.mendeley.com/download-mendeley-desktop/ ), install, go to
View menu - Citation Style submenu - More Styles… and then you can
right click to some style and press “Edit Style”.

There are improvements in the website that we would like to do soon
(e.g. list the edited styles by the current user).

If you have comments regarding the integration perhaps send to me
privately, since could be off-topic. Comments about the CSL Editor
could be done here.

I’m also trying to contact Dan Stillman to install the
zotero.org/styles list and the CSL editor in citationstyles.org
website (so users could use without a Mendeley account), no luck yet,
I guess that they are busy with some new Zotero version.

Regards, have a nice weekend,–
Carles Pina | Software Engineer

Mendeley Limited | London, UK | www.mendeley.com
Registered in England and Wales | Company Number 6419015

Hi Carles,
excellent, it’s great to see this and we’re seeing a lot of activity from
your users already. Quick question:
Look at this style we received as a submission:


It has an invalid id and no “self” link - with Steve’s version of the
translator that was basically impossible, but something seems to be
different with your integration? Could you help out that user and either
fix this in the integration or tell us (and your users) what to do
differently for styles to be submitted to the repository.

Thanks again,
SebastianOn Fri, Nov 16, 2012 at 2:18 PM, Carles Pina <@Carles_Pina>wrote:

Hello Sebastian,

Can you clarify the issue with the style ID in the original commit?
The link is valid, though the independent_styles_spec.rb script
expects that all style IDs start with “http://www.zotero.org/styles”.
Obviously, styles created by the CSL editor initially have a different
domain.

The missing self link looks like a bug on our end, although, why do we
have it if it is always expected to match the style ID?

Regards,
Rob.

Hi,

Look at this style we received as a submission:
New citation style, Harvard Reference - University of Abertay Dundee by kot-behemoth · Pull Request #286 · citation-style-language/styles · GitHub
It has an invalid id and no “self” link - with Steve’s version of the
translator that was basically impossible, but something seems to be
different with your integration? Could you help out that user and either fix

I’ll check. Just as a general comment, we use the last csl-editor code
(GitHub - citation-style-language/csl-editor: cslEditorLib - A HTML 5 library for searching and editing CSL styles) without any
change on the top of it. When we needed some changes we pushed all to
the csl-editor “upstream”.

Ah, I see what happened: the csl-editor-demo is calling
conformStyleToRepoConventions but not our implementation. I’ll
re-incorporate it. Should not cause problems as it is all done now,
but it did in the past. I’ll check at Mendeley next week.

And it’s the responsible to do part of what you said:
if (link.getAttr(“rel”) === “self”) {
selfLinkNode = link;
selfLink = link.getAttr(“href”);
}

Why is this done? I don’t know now, and when I asked months ago to
Steve Ridout he didn’t know exactly why, afair.

this in the integration or tell us (and your users) what to do differently
for styles to be submitted to the repository.

I’d like to add, in our documentation, some information for our users
with the steps to submit changes to the repository. I don’t expect all
the changes to be pushed back to the repository since it needs some
extra work and back and forth. Indeed we should help the users who
wants to do it.

Regards,

I haven’t looked at your integration, but is it feasible at some point
to allow users to submit styles to github with something close to one
click from within the editor?

I think we’re still going to need better previewing to ensure quality,
but obviously it’d be good to lower barriers to sharing as low as
possible.

Bruce

Hi,
looks like Carles is fixing this. To explain: For the repository we need
the styles to conform to the standard ID format - it seems easiest to just
save all styles to conform to repository guidelines (as Steve’s version
does), but if you prefer to have different IDs like csl.mendeley.com/
for custom styles, it’d be nice to have an easy way for users to export the
style with the ID (and link) set to the repository convention.

As for the rel=“self” link - that’s only there for independent styles and
helps handling those vs. dependent ones (which have a
rel=“independent-parent” element pointing to the parent.
Best,
SebastianOn Sat, Nov 17, 2012 at 1:22 AM, Robert Knight <@Robert_Knight>wrote:

The “self” link should resolve to a copy of the style. The style ID
should be stable and unique. Different aims, but using the Zotero
Style Repository URL worked well for both.

Rintze

How would reviewing of style submissions work in that case? It seems
rather important to be able to have a dialog with the submitter. I’m
also not looking forward to dealing with a much larger volume of
submissions that I do now.

Rintze

Hi,

Hi,
looks like Carles is fixing this. To explain: For the repository we need the
styles to conform to the standard ID format - it seems easiest to just save
all styles to conform to repository guidelines (as Steve’s version does),
but if you prefer to have different IDs like csl.mendeley.com/… for custom

in this case is not if “we prefer” but “we really need”. The style id
is used in Microsoft Word/Libreoffice documents, and needs to point to
a URL where the style is served. This is what is happening at the
moment (e.g. http://csl.mendeley.com/styles/16825/apa would download
an apa style that I did for testing).

Indeed, having an option to help the user to export the styles to the
repository could change the style id.

styles, it’d be nice to have an easy way for users to export the style with
the ID (and link) set to the repository convention.

I take note (see also some other email that I’ll write in some minutes)

Hi,

Hi,
looks like Carles is fixing this. To explain: For the repository we need the
styles to conform to the standard ID format - it seems easiest to just save
all styles to conform to repository guidelines (as Steve’s version does),
but if you prefer to have different IDs like csl.mendeley.com/… for custom

in this case is not if “we prefer” but “we really need”. The style id
is used in Microsoft Word/Libreoffice documents, and needs to point to
a URL where the style is served. This is what is happening at the
moment (e.g. http://csl.mendeley.com/styles/16825/apa would download
an apa style that I did for testing).

Indeed, having an option to help the user to export the styles to the
repository could change the style id.

Then maybe we need to rethink all of this business of style
identification and resolution, and where we want to be in the future
as a community of implementers?

The style ID is intended to be a globally unique, stable, identifier
for the style. It makes no sense for there to be 50 ids for each of 50
copies.

I guess what you “really need” is to know how to get a copy of the
style so that live formatting is consistent when sharing documents?

At the same time, we ideally really want CSL development and
distribution to be distributed, and so by definition to involve many
arbitrary URL domains (not just, as it is now in the repo,
zotero.org).

Bruce

Hi,

I’d like to add, in our documentation, some information for our users
with the steps to submit changes to the repository. I don’t expect all
the changes to be pushed back to the repository since it needs some
extra work and back and forth. Indeed we should help the users who
wants to do it.

I haven’t looked at your integration, but is it feasible at some point
to allow users to submit styles to github with something close to one
click from within the editor?

How would reviewing of style submissions work in that case? It seems
rather important to be able to have a dialog with the submitter. I’m
also not looking forward to dealing with a much larger volume of
submissions that I do now.

let me to explain…

PART 1: What happened
The mentioned bug with the invalid “self link” happened because when I
did the integration I disabled the call to
conformStyleToRepoConventions:

I disabled it because I didn’t want part of the checks that it’s
doing, particularly the “generatedStyleId” which enforces the user to
match the styleName and the styleId. I think that a valid use case is
a user who changes the styleTitle but who doesn’t want to change now
the styleId in his style (not the repository one!). If we would
enforce changing the styleId when the styleName is changed it would
break existing references to the style (could be solved with dependent
styles but it seems complicated).

But disabling the conformStyleToRepoConventions I introduced the bug
that has been mentioned before about the ’ "no “self” link’. This is
the explanation that the Mendeley editor generated a style without the
“no self link” and the Steve Ridout demo does it correctly.

PART 2: CSL Editor integration with github
I don’t think that we should force Mendeley users to send the styles
to the project. Why? Because some style edits are tests, local
variations… and because if some user sends the style to the
repository needs to be ready to take care of the style, communicate
why something is done, why is done, etc.
(we should help the user who wants to do it, indeed).

I use lot of free software, I modify different programs, but I only
send to the upstream projects part of what I change. Some changes are
things that only affects me, or that to implement properly would take
too long (I need a special function that works to me but maybe not in
all platforms and circumstances). Some things that I change would need
testing, and I only test in my computer, a proper UI, etc.

Lots of Mendeley users don’t know about free software, or don’t know
about git, collaborative projects, they don’t have time or energy to
communicate with the CSL project, etc.

Now, in the Mendeley CSL Editor we have a Style menu with some
options: “New Style” (we discussed if this option should/could be
removed, let’s not discuss it here now), “Load Style”, “Save Style”,
“Save Style As…”, “Logout”.

I think that would make sense to have “Export style to CSL project”,
with a dialog explaining what would happen, implications and what to
expect, ask for their email address and then the Mendeley CSL Editor
could create a gist (I see that it has an API:
Gists - GitHub Docs ). And it could
send the gists to some place.

Or perhaps the CSL Editor should fork and push a patch, I would need
to investigate the github APIs, etc.

Actually, this could be implemented in the csl-editor and not the
Mendeley one since it could be useful for other implementors.

I think that only a very few users would press the button to export to
the project.

Hi,On 18 November 2012 00:07, Bruce D’Arcus <@Bruce_D_Arcus1> wrote:

On Sat, Nov 17, 2012 at 6:43 PM, Carles Pina <@Carles_Pina> wrote:

Hi,

On 17 November 2012 18:38, Sebastian Karcher <@Sebastian_Karcher> wrote:

Hi,
looks like Carles is fixing this. To explain: For the repository we need the
styles to conform to the standard ID format - it seems easiest to just save
all styles to conform to repository guidelines (as Steve’s version does),
but if you prefer to have different IDs like csl.mendeley.com/… for custom

in this case is not if “we prefer” but “we really need”. The style id
is used in Microsoft Word/Libreoffice documents, and needs to point to
a URL where the style is served. This is what is happening at the
moment (e.g. http://csl.mendeley.com/styles/16825/apa would download
an apa style that I did for testing).

Indeed, having an option to help the user to export the styles to the
repository could change the style id.

Then maybe we need to rethink all of this business of style
identification and resolution, and where we want to be in the future
as a community of implementers?

The style ID is intended to be a globally unique, stable, identifier
for the style. It makes no sense for there to be 50 ids for each of 50
copies.

50 ids for each 50 modifications of the given style makes sense, no?
Who is doing 50 copies of the style?

In Mendeley we use the styleId from the repository
(Zotero Style Repository ones, would be ore clear to have the
styleIds to http://citationstyles.org/styles/ ?). We only use the
http://csl.mendeley.com/styles when a user edits the style.

Hi,

I think that would make sense to have “Export style to CSL project”,

[…]

Actually, this could be implemented in the csl-editor and not the
Mendeley one since it could be useful for other implementors.

then the steveridout instance or the http://citationstyles.org “CSL
Editor” instance could have this option (I assume that sooner or later
the CSL Editor can be hosted by citationstyles.org)

Quick clarification …

I don’t think that we should force Mendeley users to send the styles
to the project.

Absolutely agree, and wasn’t suggesting otherwise. Idea is just to
lower the barrier to submitting so it’s trivial to do so, if the user
chooses.

E.g. we agree :slight_smile:

But Rintze raises a good question: if the editor starts to
dramatically increase the volume of style submission (a good thing)
how do we ensure quality given current workflow and labor? E.g. Rintze
and Sebastian probably have enough work already, that itself probably
isn’t sustainable.

Bruce

Hi,

Hi,

Hi,
looks like Carles is fixing this. To explain: For the repository we need the
styles to conform to the standard ID format - it seems easiest to just save
all styles to conform to repository guidelines (as Steve’s version does),
but if you prefer to have different IDs like csl.mendeley.com/… for custom

in this case is not if “we prefer” but “we really need”. The style id
is used in Microsoft Word/Libreoffice documents, and needs to point to
a URL where the style is served. This is what is happening at the
moment (e.g. http://csl.mendeley.com/styles/16825/apa would download
an apa style that I did for testing).

Indeed, having an option to help the user to export the styles to the
repository could change the style id.

Then maybe we need to rethink all of this business of style
identification and resolution, and where we want to be in the future
as a community of implementers?

The style ID is intended to be a globally unique, stable, identifier
for the style. It makes no sense for there to be 50 ids for each of 50
copies.

50 ids for each 50 modifications of the given style makes sense, no?

Yeah, that’s where thing get interesting and complicated!

Perhaps we need a way to indicate that a style is some revision of
another style? With documents and Dublin Core, this is done with
versionOf properties.

Who is doing 50 copies of the style?

Sorry, I wasn’t meaning there actually is 50 copies; just making a
conceptual point.

In Mendeley we use the styleId from the repository
(Zotero Style Repository ones, would be ore clear to have the
styleIds to http://citationstyles.org/styles/ ?). We only use the
http://csl.mendeley.com/styles when a user edits the style.

OK; gotcha.

Bruce