Page 1 of 1

Not including DOI if empty?

Posted: Thu May 26, 2022 11:58 am
by FESteward
I'm trying to format my bibliography. I want to include the doi number if it has one. I have watched the video tutorial and read the manual, but I'm still having trouble as it shows up even if the field is empty. My latest attempt is this but it still doesn't work and the text "doi" still shows up. Suggestions?

a (d) “t,” f, v (i), $p. ^pp. $p-. $doi:$ ~u17.~

Also, this is less important, but I'd really like to use single quotations around the title, but when I do that it seems to delete the title entirely and just adds "t" to it. Any ideas for this one?

Thanks,
Hilary

Re: Not including DOI if empty?

Posted: Thu May 26, 2022 12:12 pm
by Jon
I suggest you not use the ~ for forward binding, there are easier (more easily understood) ways to do this:

a (d) “t,” f, v (i), $p. ^pp. $p-.$ doi: $u17.

Note that the spaces before and after "doi" are inside the $ symbols, and so they, and the DOI field, won't be output if there is no DOI.

I'm not sure what you mean by your last comment. You mean

a (d) 't,' f…

doesn't work?

Jon
Sonny Software

Re: Not including DOI if empty?

Posted: Sat May 28, 2022 2:13 am
by FESteward
Thanks so much for your quick response on both questions. The doi fix seems great.

As for the quotation marks, I guess my question is actually because the single quotation marks look a bit odd -- like the first one is backwards. Maybe that's just how they are supposed to look.

Thanks,
Hilary

Re: Not including DOI if empty?

Posted: Sat May 28, 2022 6:53 am
by Jon
I can't reproduce that. Are you sure there is a space between the year's closing parenthesis and the apostrophe? It looks like there is, but I can't be sure. If you can't figure this out, please send the format you are using to support@sonnysoftware.com