Same old story -- I know what I want but I'm damned if I can get it...
Here's what I want.
If I enter everything, I want
Author, title (Place: Publisher, 2006)
If I don't know the Place, I want
Author, title (Publisher, 2006)
If I don't know the Publisher, I want
Author, title (Place, 2006)
If I don't know either Place or Publisher, I want
Author, title (2006)
...and if I don't know nothing nohow, I want
Author, title
I can get close, but I am, as I said, damned if I can get all of this. The insoluble problem seems to be in parsing <Place> to produce:
"If <Publisher> is defined, then print "Place: " else print "Place, "
Everything else is do-able but I end up, if Place is not defined, with:
Author, title (: Publisher, 2006)
(and if nothing is defined, I end up with
Author, title (
... but that's a different story.
What I am currently using is the string
a, t|~ (~u11~)~|~, ed++. ~e|~, trans. ~u3` (`l|~: ~u|~, ~d)
Any ideas, anyone?
Place, Publisher: Date -- Formatting problem
-
- Posts: 4
- Joined: Tue Apr 19, 2005 11:00 am
- Location: Cambridge, UK
Hi Michael,
The situation where you know nothing (so to speak) is more difficult. But if you want to suppress the colon if there is no location, you should make the binding quote (~) follow the location field (you have it bound to the publishers field). Try this:
a, t|~ (~u11~)~|~, ed++. ~e|~, trans. ~u3 ` (`l~: ~u|~, ~d)
And you are right, it can be tricky getting things exactly right if you play with every conceivable combination of the availability of fields and complex punctuation.
Jon
Sonny Software
The situation where you know nothing (so to speak) is more difficult. But if you want to suppress the colon if there is no location, you should make the binding quote (~) follow the location field (you have it bound to the publishers field). Try this:
a, t|~ (~u11~)~|~, ed++. ~e|~, trans. ~u3 ` (`l~: ~u|~, ~d)
And you are right, it can be tricky getting things exactly right if you play with every conceivable combination of the availability of fields and complex punctuation.
Jon
Sonny Software
-
- Posts: 4
- Joined: Tue Apr 19, 2005 11:00 am
- Location: Cambridge, UK
Fair enough. But realistically, are there situations where you know the place of publication but not the publisher?
Jon
Sonny Software
Jon
Sonny Software
Last edited by Jon on Fri Mar 17, 2006 8:12 am, edited 1 time in total.