Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am working on an article for a Springer journal, and the specifications for manuscripts clearly ask to italicize all journal names and book titles. Doing it manually feels stupid, so I wonder if there's a way to make the BibTeX style do the trick for me. I am currently using spbasic.bst (natbib compatible stuff), and I have no experience in the obscure .bst language. Any hints?

share|improve this question
    
Welcome to TeX.SE. I took the liberty to format your post a little. See this link for more details on available formatting. –  tohecz Aug 18 '12 at 18:53
    
Thanks @tohecz :) –  anna-earwen Aug 18 '12 at 18:56
add comment

2 Answers

up vote 10 down vote accepted

As you say, the BibTeX stack language is a bit tricky. Here, we need to alter two functions. In a renamed copy of spbasic.bst, you first want to make journal names italic by altering FUNCTION {article}. It contains the lines

journal
remove.dots

which need so be altered to

journal
remove.dots
"\emph{" swap$ * "}" *

To alter book titles, changes are needed to FUNCTION {format.btitle}, which is short so I'll reproduce in full

FUNCTION {format.btitle}
  { 
    title "title" bibinfo.check
    duplicate$ empty$ 
      'skip$
      {
       "\emph{" swap$ * "}" * 
      }
     if$
}

In both cases, we are working with a stack containing 'the thing to be made italic'. First, I've added \emph{ to the stack, then used swap$ to put the thing after \emph{ on the stack. The * concatenates the two, then I add } to the stack and concatenate again.

share|improve this answer
    
Thank you very much, it works like magic! Could you please add the missing " after the first } in the first code bit to make it completely copy-pastable? –  anna-earwen Aug 18 '12 at 19:30
1  
How would I use this to italicize the booktitles of conference proceedings? I bet the same line of code is usable, but I can't figure out where to paste it. :) –  anna-earwen Aug 18 '12 at 19:42
2  
@anna-earwen I guess you want to modify inproceedings (the above change should alter proceedings entries). To do that, in the FUNCTION {inproceedings} change the format.title "title" output.check to format.btitle "title" output.check. –  Joseph Wright Aug 18 '12 at 19:48
    
Would it make sense to modify the FUNCTION {format.booktitle} to look something like booktitle "booktitle" bibinfo.check "\emph{" swap$ * "}" *? It seems to work, I wonder if it covers all possible "booktitles" of the BibTeX entries. Thanks again for the help! –  anna-earwen Aug 18 '12 at 19:54
2  
And yet they distribute it with a Springer template, which makes me wonder :) –  anna-earwen Aug 18 '12 at 20:04
show 1 more comment

To those who wonder and (possibly) struggle with Springer and their double standards (OK, I never said that): here's my take on BibTeX formatting, a manually modified spbasic.bst: spbasicemph.bst. It brings the bibliography format as close to Springer Swarm Intelligence journal standard as I could get.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.