How to use special characters in csl
How can I use special characters in a csl style, e.g. the non-breaking space or a m-dash? I'd like to use e.g. the non-breaking space between the prefix "S." and the page numbers.
This is an old discussion that has not been active in a long time. Instead of commenting here, you should start a new discussion. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
<text variable="locator" prefix="&#x00A0;"/>
Note that you need to use numeric character references for most things, rather than named entities. Wikipedia (among other sources) has a list of codes.in general, try
<...suffix="
"/>
including the line break.
title
author
publication
publication-date
URL
The code I tried appended suffix="& # x 0 D;" to, for example:
<text macro="title" suffix="& # x 0 D;"/>
<text macro="container" suffix="& # x 0 D;"/>
<text macro="access" suffix="& # x 0 D;"/>
<text variable="URL" suffix="& # x 0 D;"/>
Returns in Word:
title\linecontainer\lineaccess\lineURL\line
Instead of what I want:
title
container
access
URL
<text macro="title" suffix="
"/>
<text macro="container" suffix="
"/>
<text macro="access" suffix="
"/>
<text variable="URL" suffix="
"/>
exactly like that. Works for me.
edit: ooh wait, so does your solution... so maybe something else is going on.
I don't know whether it makes a difference, but I am using MS Word 2003 SP 3.
The code is:
<citation>
<option name="et-al-min" value="99"/>
<option name="et-al-use-first" value="1"/>
<layout delimiter=" " display="block">
<group delimiter=" ">
<choose>
<if variable="author editor translator" match="any">
<group delimiter=" ">
<text macro="author" display="block"/>
</group>
</if>
<else>
<text variable="locator" prefix=" " display="block"/>
<text macro="title" display="block"/>
</else>
</choose>
<text macro="title" display="block"/>
<text macro="container" display="block"/>
<text macro="access" display="block"/>
<text variable="URL" display="block"/>
</group>
</layout>
</citation>
Would appreciate any assistance!! Thanks.
the xml code and suffix="
"
work without a problem. Have you tried debugging your style to check it's not got other problems which are stopping your citations from displaying properly?
Thomas, just to makes sure we're on the same page, if you try this in the test pane:
chrome://zotero/content/tools/csledit.xul
it looks OK, right? James - do you have Word? Have you tried this in Word?
oh wait - which Zotero version are you using? and which plugin?
I also know that line breaks in bibliographies worked fine in Zotero 1.0 and MS Word because I wrote a style that used them.
<citation>
<option name="et-al-min" value="99"/>
<option name="et-al-use-first" value="1"/>
<layout delimiter=" " display="block">
<group delimiter=" " display="block">
<choose>
<if variable="author editor translator" match="any">
<group delimiter=" ">
<text macro="author"/>
</group>
</if>
</choose>
<text macro="title" display="block"/>
<text macro="container" display="block"/>
<text macro="access" display="block"/>
<text variable="URL" display="block"/>
</group>
</layout>
</citation>
I realize there are other problems - particularly, the date (access) is not displaying at all - but I think perhaps it'd be best that I fumble with this myself rather than publicly embarrass myself further. :-/