How to create a conditional citation with relevant years?
-
- Posts: 177
- Joined: Fri Mar 20, 2015 9:17 am
How to create a conditional citation with relevant years?
I’m having a problem with creating a conditional citation in the subsequent optional field. I have read about Conditional groups on p. 242 in the User Guide, but that didn’t solve the problem.
The books I keep in Bookends often have 3 or even 5 different publishing dates; and as someone who works in the humanities, they are all important to me. I’m talking about
1) The year in which the book I’m citing was published
2) The year the edition I’m citing was first published
3) The year the book (not necessarily the edition I’m using) was first published in my country
4) The year it was first published abroad, in case it was translated.
5) The year it was first published worldwide. This may or may not be the same as 4)
The following example should explain what I mean:
Borowitch, Nicolai: The Present Situation in the Ukraine. Transl. from the German by Ole Arnold. London: MacMillan 2015.
This edition was first published 1972 in Great Britain.
The book itself was first published in Manchester, England, in 1912.
In Germany, this edition, including the foreword, was first published in 1814.
Originally, the book itself was first published in Leipzig in 1674.
So the The Present Situation in the Ukraine is a book about the Ukraine in the 17th century! I like to make this clear by using a superscript. This is how I want the formatted citation in the field to look like:
The custom fields involved are:
d = Year = 2015
u4 = ThisEditionFirst = 1972
u19 = Orig Year [in this country] = 1912
u20 = FirstPublished [worldwide] = 1674
And now we come to the most important part. The ‘subsequent field’ should first output d (the year in which the cited book was published), and then u20 = FirstPublished [worldwide] with superscripted “1” before the year to indicate that it’s a first edition. Now, if u20 is empty, then output u19 = Orig Year [in this country] with superscripted “1”. If that field is empty, then output u4 = ThisEditionFirst with superscripted “1”. If this field is empty, then output only d.
This is the closest I have managed to get:
a: s. ~[~d ^1^u20~].~ ^1^u4~].~
If I enter this
a: s. ~[~d {^1^u20~].~ ^1^u19~ ^1^u4~].~}
only d is output.
If all fields are empty, except d, I get this:
and the closing bracket after the year is missing.
Using ^ inside curly brackets is supposed to build a conditional group, but in the group I’m creating ^1^ will also superscript the number “1”. And ^ is also used in Bookends to adjust text to # of pages cited. So I may be using the same character ^ for multiple actions. Is that perhaps bound to fail?
The books I keep in Bookends often have 3 or even 5 different publishing dates; and as someone who works in the humanities, they are all important to me. I’m talking about
1) The year in which the book I’m citing was published
2) The year the edition I’m citing was first published
3) The year the book (not necessarily the edition I’m using) was first published in my country
4) The year it was first published abroad, in case it was translated.
5) The year it was first published worldwide. This may or may not be the same as 4)
The following example should explain what I mean:
Borowitch, Nicolai: The Present Situation in the Ukraine. Transl. from the German by Ole Arnold. London: MacMillan 2015.
This edition was first published 1972 in Great Britain.
The book itself was first published in Manchester, England, in 1912.
In Germany, this edition, including the foreword, was first published in 1814.
Originally, the book itself was first published in Leipzig in 1674.
So the The Present Situation in the Ukraine is a book about the Ukraine in the 17th century! I like to make this clear by using a superscript. This is how I want the formatted citation in the field to look like:
The custom fields involved are:
d = Year = 2015
u4 = ThisEditionFirst = 1972
u19 = Orig Year [in this country] = 1912
u20 = FirstPublished [worldwide] = 1674
And now we come to the most important part. The ‘subsequent field’ should first output d (the year in which the cited book was published), and then u20 = FirstPublished [worldwide] with superscripted “1” before the year to indicate that it’s a first edition. Now, if u20 is empty, then output u19 = Orig Year [in this country] with superscripted “1”. If that field is empty, then output u4 = ThisEditionFirst with superscripted “1”. If this field is empty, then output only d.
This is the closest I have managed to get:
a: s. ~[~d ^1^u20~].~ ^1^u4~].~
If I enter this
a: s. ~[~d {^1^u20~].~ ^1^u19~ ^1^u4~].~}
only d is output.
If all fields are empty, except d, I get this:
and the closing bracket after the year is missing.
Using ^ inside curly brackets is supposed to build a conditional group, but in the group I’m creating ^1^ will also superscript the number “1”. And ^ is also used in Bookends to adjust text to # of pages cited. So I may be using the same character ^ for multiple actions. Is that perhaps bound to fail?
Re: How to create a conditional citation with relevant years?
The ^ in the conditional group doesn't mean superscript. But if it's in the metadata, it does. If you use a field that contains ^1^, a superscripted 1 should be output.
As for your format, it seems overcomplicated. I'd avoid using ~ unless it's absolutely necessary (it rarely is). It makes the logic difficult to follow. And conditional groups are enclosed in curly brackets.
Without replicating your exact setup, this simplified example might help
{d u5 u20 ^u19 u5 ^u4 u5 ^d}
will output (I think) the fields you want depending on which are empty and which aren't. If user5 contains ^1^, a superscripted 1 should be output where u5 is entered.
I just tried this example, with data entered in d (2015), u5 (^1^), and u20 (1674), and got this result
2015 1 1674
where the 1 is superscripted.
Jon
Sonny Software
As for your format, it seems overcomplicated. I'd avoid using ~ unless it's absolutely necessary (it rarely is). It makes the logic difficult to follow. And conditional groups are enclosed in curly brackets.
Without replicating your exact setup, this simplified example might help
{d u5 u20 ^u19 u5 ^u4 u5 ^d}
will output (I think) the fields you want depending on which are empty and which aren't. If user5 contains ^1^, a superscripted 1 should be output where u5 is entered.
I just tried this example, with data entered in d (2015), u5 (^1^), and u20 (1674), and got this result
2015 1 1674
where the 1 is superscripted.
Jon
Sonny Software
-
- Posts: 177
- Joined: Fri Mar 20, 2015 9:17 am
Re: How to create a conditional citation with relevant years?
u5 by me is Call Num.this simplified example might help
{d u5 u20 ^u19 u5 ^u4 u5 ^d}
Did you introduce u5 intentional, or was it a mistake?
{d u5 u20 ^u19 u5 ^u4 u5 ^d} just gives me the Year [= 2015], nothing else.
Re: How to create a conditional citation with relevant years?
You can use any user field for any purpose. I picked that one.
I wonder if you entered the string I provided for the relevant reference Type. If you think you did, please send me the filter you edited and your Bookends library. And tell me which reference I should use.
Jon
Sonny Software
I wonder if you entered the string I provided for the relevant reference Type. If you think you did, please send me the filter you edited and your Bookends library. And tell me which reference I should use.
Jon
Sonny Software
-
- Posts: 177
- Joined: Fri Mar 20, 2015 9:17 am
Re: How to create a conditional citation with relevant years?
This is pretty good
{d u20 ^d u19 ^d u4^d}
But now I need to enter the superscripts before u20, u19, and u4.
How can I do that?
{d u20 ^d u19 ^d u4^d}
But now I need to enter the superscripts before u20, u19, and u4.
How can I do that?
Re: How to create a conditional citation with relevant years?
As I said, you need to apply them in the reference. And that's what I used User5 for:
If user5 contains ^1^, a superscripted 1 should be output where u5 is entered (in the format).
Jon
Sonny Software
If user5 contains ^1^, a superscripted 1 should be output where u5 is entered (in the format).
Jon
Sonny Software
-
- Posts: 177
- Joined: Fri Mar 20, 2015 9:17 am
Re: How to create a conditional citation with relevant years?
I think I can do it with this:Philologist wrote: ↑Mon Jul 29, 2024 2:23 pm This is pretty good
{d u20 ^d u19 ^d u4^d}
But now I need to enter the superscripts before u20, u19, and u4.
How can I do that?
{d řu20 ^d řu19 ^d řu4^d}
A Nisus macro scans the document and then replaces all ř with the superscripted number “1”.
Re: How to create a conditional citation with relevant years?
To be fully Bookends-autonomous you can assign a user field for this purpose. But yes, your post-processing step looks like a good solution.
Jon
Sonny Software
Jon
Sonny Software
-
- Posts: 177
- Joined: Fri Mar 20, 2015 9:17 am
Re: How to create a conditional citation with relevant years?
But all user fields are already taken!
This is what I have always found that needs to be improved in Bookends. People working in STEM subjects only need the *latest* edition of a book or an articles and consequently only few fields. We in the humanities, need much more, and it is sometimes a pain to have to cramp disparate information into just one field. I often need to evaluate a book for educational purposes (standard work, obsolete, first class, for beginners only, for advanced learners, etc.) and I’m forced to cram this into the Keyword field because all other fields are already taken.
Would it be complicated to add, let’s say, 10 new custom fields in Bookends?
-
- Posts: 177
- Joined: Fri Mar 20, 2015 9:17 am
Re: How to create a conditional citation with relevant years?
Holy Moses! I’ve done it!
a: s {$[$d, řu20~]~^$[$d, řu19~]~^$[$d, řu4~]~^$[$d$]$}
Thank you for your help. You put me on the right track.
Happy days are back again! :–)
a: s {$[$d, řu20~]~^$[$d, řu19~]~^$[$d, řu4~]~^$[$d$]$}
Thank you for your help. You put me on the right track.
Happy days are back again! :–)
Re: How to create a conditional citation with relevant years?
I'm glad to here it. And if you leave out the ~ characters?
Jon
Sonny Software
Jon
Sonny Software
-
- Posts: 177
- Joined: Fri Mar 20, 2015 9:17 am
Re: How to create a conditional citation with relevant years?
I don't think you need $, either. I'd try simply
a: s {[d, řu20]^[d, řu19]^[d, řu4]^[d]}
And if there can be a situation where all of these fields are empty (including d), I'd add a last ^, meaning output nothing:
a: s {[d, řu20]^[d, řu19]^[d, řu4]^[d]^}
Jon
Sonny Software
a: s {[d, řu20]^[d, řu19]^[d, řu4]^[d]}
And if there can be a situation where all of these fields are empty (including d), I'd add a last ^, meaning output nothing:
a: s {[d, řu20]^[d, řu19]^[d, řu4]^[d]^}
Jon
Sonny Software
-
- Posts: 177
- Joined: Fri Mar 20, 2015 9:17 am
Re: How to create a conditional citation with relevant years?
That’s true. Thank you for pointing that out.I don't think you need $, either.
Would it be complicated to add additional custom fields to Bookends, as I mentioned earlier?
Re: How to create a conditional citation with relevant years?
It's something that would affect almost every feature, so It's not something I would do lightly. Many of the existing field that have default labels (not generic ones) are rarely used. It sounds like you have special needs for fields like Trans Auth, Orig Pub, Reprint Edn, Medium, and Call Num, but of course then you don't need PMID or PMCID, which you can repurpose. I don't recall a request for more fields. What do other users think? Would more user-defined fields be useful?
Jon
Sonny Software
Jon
Sonny Software