CITATION Tag switches

Dec 10, 2008 at 11:27 AM
Is there any way in xsl to detect any other switches than those predefined by Microsoft? For example passing a switch like { CITATION tag /x }.
Dec 10, 2008 at 12:20 PM
Unfortunately not. Word translates the switches internally to xml elements which it sends to the stylesheet. If you try to add extra elements, it just doesn't know how to translate them.

I agree that they should at least have defined a simple custom switch where the arguments could be used for processing. Personally, if I need something like that, I abuse the \f switch. For 'innocent' users, \f could very well mean 'format' instead of 'prefix'.
Dec 13, 2008 at 2:27 PM
Edited Dec 13, 2008 at 2:28 PM

Yves it's a huge job what you did with these templates.

Since I'm a BibTeX user I made an export filter for JabRef for proper export to Word2007 XML, but I wished to use my own styles (Book->bib:Book, Article->bib:Article, etc.). I then took your Harvard - Anglia* style and modified it to achieve the style required for the Animal Behaviour journal. The reason why I’m sending you this note is that I’ve added a twist in the modification. I’ve changed a bit of your code and abused the \v parameter so that now, when citing works, there are two modes:

A) Text: {CITATION LebarBajec_2003a} => Lebar Bajec et al. (2003a)

B) In parentheses: {CITATION LebarBajec_2003a \t} => (Lebar Bajec et al. 2003a)

Additionally when citing multiple works you can get the following:

A) {CITATION LebarBajec_2003a \m Moskon_2007 \m Nathan_2008}
Lebar Bajec et al. (2003a), Moškon et al. (2007) and Nathan & Barbosa (2008)

B) {CITATION LebarBajec_2003a \t \m Moskon_2007 \t \m Nathan_2008 \t}
(Lebar Bajec et al. 2003a; Moškon et al. 2007; Nathan & Barbosa 2008)

C) {CITATION LebarBajec_2003a \m LebarBajec_2003b \n \y \m LebarBajec_2005 \n }
Lebar Bajec et al. (2003a, b, 2005)

D) {CITATION LebarBajec_2003a \t \m LebarBajec_2003b \t \n \y \m LebarBajec_2005 \t \n } 
(Lebar Bajec et al. 2003a, b, 2005)

or even
E) {CITATION LebarBajec_2003a \m LebarBajec_2003b \n \y \m Nathan_2008}
Lebar Bajec et al. (2003a, b) and Nathan & Barbosa (2008)


F) {CITATION LebarBajec_2003a \t \m LebarBajec_2003b \t \n \y \m Moskon_2007 \t}
(Lebar Bajec et al. 2003a, b; Nathan & Barbosa 2008)

The \v parameter was abused for writing in possessive mode:

{CITATION Nathan_2008 \v"’s"} work …
Nathan & Barbosas (2008) work …

Send me an e-mail if you think the code might come handy.