<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19190">
<STYLE>@font-face {
        font-family: Calibri;
}
@page WordSection1 {size: 612.0pt 792.0pt; margin: 72.0pt 72.0pt 72.0pt 72.0pt; }
P.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Calibri","sans-serif"; FONT-SIZE: 11pt
}
LI.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Calibri","sans-serif"; FONT-SIZE: 11pt
}
DIV.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Calibri","sans-serif"; FONT-SIZE: 11pt
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.EmailStyle17 {
        FONT-FAMILY: "Calibri","sans-serif"; COLOR: windowtext; mso-style-type: personal-compose
}
.MsoChpDefault {
        mso-style-type: export-only
}
DIV.WordSection1 {
        page: WordSection1
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-GB link=blue vLink=purple>
<DIV><SPAN class=814295314-14032012><FONT color=#0000ff size=2
face=Arial>You may be able to do this with a custom render function for the
field (see below). I haven't tried this on a name field before - only text
fields which don't appear in the citation - so proceed with
caution!</FONT></SPAN></DIV>
<DIV><SPAN class=814295314-14032012><FONT color=#0000ff size=2
face=Arial>Alternatively, </FONT></SPAN><SPAN
class=814295314-14032012><FONT color=#0000ff size=2 face=Arial>look in
~/perl_lib/EPrints/Utils.pm at 'make_name_string' - this may also be useful (but
will affect all fields of type 'name').</FONT></SPAN></DIV>
<DIV><SPAN class=814295314-14032012></SPAN><SPAN class=814295314-14032012><FONT
color=#0000ff size=2 face=Arial></FONT></SPAN><SPAN
class=814295314-14032012><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=814295314-14032012><FONT color=#0000ff size=2 face=Arial>In
eprint_fields.pl, add a 'render_value' to the field:</FONT></SPAN></DIV>
<DIV><SPAN class=814295314-14032012><FONT color=#0000ff size=2
face=Arial>{<BR> 'name' =>
'creators',<BR> 'type' => 'compound',<BR>
'multiple' => 1,<BR> 'fields' =>
[<BR>
{<BR>
'sub_name' =>
'name',<BR>
'type' =>
'name',<BR>
'hide_honourific' =>
1,<BR>
'hide_lineage' =>
1,<BR>
'family_first' => 1,<BR>
},<BR>
{<BR>
'sub_name' =>
'id',<BR>
'type' =>
'text',<BR>
'input_cols' =>
20,<BR>
'allow_null' => 1,<BR>
}<BR> ],<BR> 'input_boxes' =>
4,</FONT></SPAN></DIV>
<DIV><SPAN class=814295314-14032012><FONT color=#0000ff size=2
face=Arial> 'render_value' =>
'my_lovely_creator_renderer'<BR>},<BR></FONT></SPAN></DIV>
<DIV><SPAN class=814295314-14032012><FONT color=#0000ff size=2 face=Arial>In
another file (my_lovely_creator_rendered.pl?):</FONT></SPAN></DIV>
<DIV><SPAN class=814295314-14032012><FONT color=#0000ff size=2
face=Arial>$c->{my_lovely_creator_renderer} = sub {<BR> my(
$session , $field , $value ) = @_;</FONT></SPAN></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=814295314-14032012> </SPAN>my $frag =
$session->make_doc_fragment;</FONT></FONT></FONT></DIV>
<DIV><SPAN class=814295314-14032012><FONT color=#0000ff size=2 face=Arial>#do
some perl magic to return the value how you want it</FONT></SPAN></DIV>
<DIV><FONT color=#0000ff size=2 face=Arial></FONT> </DIV>
<DIV><SPAN class=814295314-14032012><FONT color=#0000ff size=2
face=Arial> return $frag;<BR>};<BR></FONT></SPAN></DIV>
<DIV><SPAN class=814295314-14032012><FONT color=#0000ff size=2 face=Arial>
<DIV><SPAN class=814295314-14032012><FONT color=#0000ff size=2
face=Arial>Cheers,</FONT></SPAN></DIV>
<DIV><SPAN class=814295314-14032012><FONT color=#0000ff size=2
face=Arial>John</FONT></SPAN></DIV></DIV></FONT></SPAN><SPAN
class=814295314-14032012><FONT color=#0000ff size=2
face=Arial></FONT></SPAN><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> eprints-tech-bounces@ecs.soton.ac.uk
[mailto:eprints-tech-bounces@ecs.soton.ac.uk] <B>On Behalf Of </B>Chris
Keene<BR><B>Sent:</B> 14 March 2012 14:40<BR><B>To:</B>
eprints-tech@ecs.soton.ac.uk<BR><B>Subject:</B> [EP-tech] using a creator's
inital in a citation<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=WordSection1>
<P class=MsoNormal>Hi<o:p></o:p></P>
<P class=MsoNormal>We are currently reviewing how we add author names in to the
creators fields of eprints, e.g. do we use the same format as the official
source, do we use full names, or surname and initial.<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>I’d like to know if it is possible to configure a eprints
citation / view so that it only shows an initial for the forename, even if the
field itself contains a full version of the forename? <o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>This would allow us to store the full name where we have it,
while showing a consistent citation style of author names on the public
site.<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Many thanks for any tips<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Chris<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Chris Keene <BR>Technical Development Manager, University of
Sussex Library <BR>Contact: <A
href="http://www.sussex.ac.uk/profiles/150000"><SPAN
style="COLOR: blue">http://www.sussex.ac.uk/profiles/150000</SPAN></A><o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P></DIV></BODY></HTML>