Page 1 of 1

Format code help needed

Posted: Sat May 07, 2011 7:56 pm
by kjmatthews
I am trying to help a friend massage the Chicago 15th A style into submission, and have run into an obstacle I seem unable to overcome. I am trying to produce the following output in a footnote citation:

1. Christopher Bayly, Empire and Information: Intelligence Gathering and Social Communication in India, 1780-1870 (Cambridge: Cambridge University Press, 1996), p. 313.

2. Christopher Bayly, Empire and Information: Intelligence Gathering and Social Communication in India, 1780-1870 (Cambridge: Cambridge University Press, 1996), pp. 313-314.

3. Christopher Bayly, Empire and Information: Intelligence Gathering and Social Communication in India, 1780-1870 (Cambridge: Cambridge University Press, 1996).

Starting conditions: in the "citation options" tab of the formats manager for Chicago 15th A, the "Cited Pages" field has "p. ^pp. " in the Before textbox, and "." in the After textbox.

The following:

Code: Select all

a, t$, $$trans. $u3*|~, ~u2~ ed.~~, ~u13~ vols.~~, vol. ~v|~, ~f` (`l: u, d$; reprint $u12`)`, p-.
produces appropriate output for cases 1 & 2, but outputs
Christopher Bayly, Empire and Information: Intelligence Gathering and Social Communication in India, 1780-1870 (Cambridge: Cambridge University Press, 1996),
in case 3.

In trying to convert this spurious comma into a period, we have managed to produce some very weird output, that we are unable to explain. We have tried the following:

NB: the following examples are identical to the above up to `)`

Code: Select all

`)`|~, ~p-.
which we thought should output the comma only when p- is not empty, but which produces errors in all three cases (suppressing the comma and space before the page numbers in cases 1 & 2, suppressing the final period in case 3).

Code: Select all

`)`, p-`.`
outputs case 3 correctly, but replaces the comma before the page numbers with a period in cases 1 & 2 (what!?).

Code: Select all

`)`|~, ~p-`.`
outputs the same, but eliminates the space after the erroneous period.

Code: Select all

`)`$, $p-.
suppresses the comma and space in cases 1 & 2 and eliminates the final period in case 3. Enclosing the final period in back ticks (`.`) restores it in case 3, but inserts it in place of the comma and space in cases 1 & 2. Enclosing it in dollar signs ($.$) or tildes (~.~) is the same as not enclosing it at all.

Growing increasingly desperate, we tried conditionals:

Code: Select all

`)`{, p-.^.}
outputs case 3 correctly, but outputs a period instead of a comma and space before the page numbers in cases 1 & 2.

I think we have exhausted our options. Can someone explain what we are doing wrong? Or are we asking the impossible?

Re: Format code help needed

Posted: Sun May 08, 2011 7:54 am
by Jon
I made two small modifications to your initial formatting instructions.

1. In Chicago 15th A Footnotes after entering, I added a `.` at the end:

a, t$, $$trans. $u3*|~, ~u2~ ed.~~, ~u13~ vols.~~, vol. ~v|~, ~f` (`l: u, d$; reprint $u12`)`, p-`.`


2. Chicago 15th A, I entered ", p. ^pp. " in the Before Cited Pages box (note the comma and space at the beginning.

It seems to work. If that doesn't for you, please contact me off-forum and send the actual reference you are citing.

Jon
Sonny Software