add "year" to HarvardAnglia at the end of "BookSection"

Mar 31, 2009 at 9:15 PM
Edited Mar 31, 2009 at 9:16 PM
Hey guys!

Today I started customizing the "HarvardAnglia" style and everything looks perfect except of one small thing. I'm trying to add the Year at the end of "BookSection" for several hours, but without having success. Right now it looks like the following:

<source type="BookSection"> <column id="1"> <halign>left</halign> <valign>top</valign> <format> {<b>%Author:2|Editor:3|BookAuthor:2%{ (%Year|"n.d"%{%YearSuffix%})</b>:}}{ "%Title|ShortTitle%"}{, in:{ %Editor:3|BookAuthor:2%} (Hrsg.): <i>%BookTitle%</i>{, %Edition:%. Edition},}{ %City%{: %Publisher%}}{ %Publisher%}{, Available: %URL%{ [{{%DayAccessed% }%MonthAccessed:s% }%YearAccessed%]}}{, %Pages:S. :S. %.}. </format> </column> <sortkey>{%Author:0|Editor:0|BookAuthor:0|Title|ShortTitle%}{ %Year%}{ %Title|ShortTitle%}</sortkey> </source>

What can I do to add the year at the end of the row "BookSection"??
Coordinator
Mar 31, 2009 at 10:43 PM

By default each variable can only be used once. To achieve this result, BibWord keeps an internal list during formatting of variables which you already used. This allows for complex conditional formatting schemes. For example for Volume and Issue you could create something like this:

{ %Volume%{(%Issue%)} }{ no. %Issue% }

If both Volume(5) and Issue(3) are available then one would get 5(3). As Issue is already used, there would be no trailing no. 3. If only Issue(3) is available, one would get no. 3.

BibWord provides a workaround by means of the r option for variables. With the option, you can ensure that whenever a variable is used, it is not added to the used list. That way, it can be reused later on.

For your example, the format code would look like (look for the bold r):

<format>{%Author:2|Editor:3|"Anon."%,}{ %Year:r|"n.d."%{%YearSuffix%}.}{ %Title|ShortTitle%.}{ In{ %Editor:3|BookAuthor:2%} &lt;i&gt;%BookTitle|ShortTitle%&lt;/i&gt;.{ %Edition:o% ed.}}{ %City%}{: %Publisher%}.{ Ch. %ChapterNumber%.}{ %Pages:p.:pp.:a2%.}{ %Year%.}</format>

For more information on other formatting options, check out the BibWord Guide that comes with each release of BibWord.

Apr 2, 2009 at 10:23 AM
Thank you very much for your help!!