Conditional use of Page or Pages

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
digitaltheologian
Posts: 14
Joined: Tue Sep 14, 2021 2:36 pm

Conditional use of Page or Pages

Post by digitaltheologian »

I need to render the word Page when one page is referenced or Pages when multiple pages are referenced.

Code: Select all

$p. ^pp. $p-
The example above renders the logic, and now I am trying to figure out how to replace p and pp, respectively, with page and pages.

Any guidance will be greatly appreciated.
digitaltheologian
Posts: 14
Joined: Tue Sep 14, 2021 2:36 pm

Re: Conditional use of Page or Pages

Post by digitaltheologian »

For example:

When there is one page:
Attridge, Harold A. “Jewish Historiography.” Page 311 in Early Judaism and Its Modern Interpreters. Edited by Robert A. Kraft and George W. E. Nickelsburg. Philadelphia: Fortress; Atlanta: Scholars Press, 1986.

When there are multiple pages:
Attridge, Harold A. “Jewish Historiography.” Pages 311–343 in Early Judaism and Its Modern Interpreters. Edited by Robert A. Kraft and George W. E. Nickelsburg. Philadelphia: Fortress; Atlanta: Scholars Press, 1986.

This works for multiple pages, and I cannot figure out how to make this conditional:

Code: Select all

a. “t.” $Pages $p– $ in $v. l: u, d.
digitaltheologian
Posts: 14
Joined: Tue Sep 14, 2021 2:36 pm

Re: Conditional use of Page or Pages

Post by digitaltheologian »

I have tried using the following snippet but it always renders Pages regardless of whether or not I list a single page or a range.

Code: Select all

$Page^^Pages $p-
Jon
Site Admin
Posts: 10291
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Conditional use of Page or Pages

Post by Jon »

Because you're using 2 carets. It should be

$Page ^Pages $p-

And note the space after Page and Pages.

Jon
Sonny Software
digitaltheologian
Posts: 14
Joined: Tue Sep 14, 2021 2:36 pm

Re: Conditional use of Page or Pages

Post by digitaltheologian »

Ah, thank you, Jon. I was getting confused between the single ^ and double ^.
Post Reply