0

I need to cite a Wikimedia image, so following the instructions in https://en.wikipedia.org/wiki/Wikipedia:Citing_Wikipedia#BibTeX_entry, I created a bib item like this:

@misc{pict2,
   author = "{Wikipedia contributors}",
   title = "Plagiarism --- {W}ikipedia{,} The Free Encyclopedia",
   year = "last accessed 2004/12/02",
   url = "https://en.wikipedia.org/w/index.php?title=Plagiarism&oldid=5139350",
   note = "[Online; accessed 22-July-2004]",
   howpublished = "\url{https://en.wikipedia.org/w/index.php?title=Plagiarism&oldid=5139350}"
}

I use \bibliographystyle{JHEP} (it can be found here: https://jhep.sissa.it/jhep/help/JHEP_TeXclass.jsp). Now, the output is like the one in the screenshot.

enter image description here

I want to eliminate the period at the end of the title and add a comma after it. I tried the \EatDot approach (How to delete a full stop on reference ending), but it complains that

--line 28 of file biblio_MDN_CB.bib
I was expecting a `,' or a `}'---line 39 of file biblio_MDN_CB.bib
 :    title = "Plagiarism --- {W}ikipedia{,} The Free Encyclopedia"
 :                                                                 \EatDot,
I'm skipping whatever remains of this entry

Also: how can I make the title italics/emph AND without quotes? This is how it works for article and that's how I would it to be for Wikimedia pages too:

enter image description here

Cheers!

1 Answers1

2

You can modify (a copy of) JHEP.bst, calling it JHEP-mod.bst.

Change lines

    383 FUNCTION {format.title.p}
    384 { title empty$
    385     { "" }
    386     { "``" title "t" change.case$ * ".''" * }
    387   if$

to

    383 FUNCTION {format.title.p}
    384 { title empty$
    385     { "" }
    386     { "``" title "t" change.case$ * "''" * } % <--- here
    387   if$

and lines

     75 FUNCTION {output.nonnull}
     76 {
     77   's :=
     78   output.state mid.sentence =
     79     { " " * write$ }
     80     { output.state after.quote =
     81             { ", " * write$ }

to

     75 FUNCTION {output.nonnull}
     76 {
     77   's :=
     78   output.state mid.sentence =
     79     { ", " * write$ } % <--- here
     80     { output.state after.quote =
     81             { ", " * write$ }

enter image description here

egreg
  • 1,121,712
  • Many thanks, I'll try it! How could I also make the title appear in \emph and without quotes? I just managed to narrow down the cause to the howpublished = "\url{address}" line. – kingworld Jul 09 '21 at 16:04
  • 1
    @kingworld In this case I suggest to change all occurrences of format.title.p into format.title (except where the former function is defined). – egreg Jul 09 '21 at 16:08
  • Thanks! It seems it's working exactly as I wished! Many cheers :) – kingworld Jul 09 '21 at 16:23