2

I have a bib file, however, I would like to automate the process that gives me the output below (new lines are included):

Paper Title (\title{})
Authors (\author{})
Proceedings of the xxx conference, 2018 (\inproceedings{})
Acceptance Rate (\notes{})

instead of Authors, Title, conference, notes.

Here is a simple example of a reference created from a bib file automatically using, as an example, \bibliographystyle{ACM-Reference-Format} \bibliography{refs/mybib.bib} :

John is First Author (underline the first author), Matt is the second Author, This is the paper title, Proceedings of the Latex Conference, 2018, Acceptance Rate 5%

The corresponding mybib.bib includes example entry as follows:

@InProceedings{example,
  Title                    = {This is the paper title},
  Author                   = {John is First Author, Matt is the second Author},
  Booktitle                = {Proceedings of the Latex Conference},
  Year                     = {2018},
  Notes                    = {Acceptance Rate 5%}
}

And, here is the format to be printed:

This is the paper title
John is First Author (underline John), Matt is the second Author
Proceedings of the Latex Conference, 2018
Acceptance Rate 5%
6
  • 3
    Please provide an MWEB. I removed the 'cross-referencing' tag as it is irrelevant here. (Cross-references refer to other parts of your document or another of your documents - not external sources.) Right now, it is completely unclear what you're asking.
    – cfr
    Commented Jun 10, 2018 at 0:23
  • I hope I'm clear now, cfr.
    – berkay
    Commented Jun 10, 2018 at 2:18
  • 5
    Please provide a minimal working example with bibliography which produces the output you want to change. I have no idea how you get bibliography entries which feature acceptance rates or what style you're using or anything else. Improving your question would do a lot more to encourage useful answers than a 50 point bounty. Who knows what would even be a useful answer? I have no idea at all.
    – cfr
    Commented Jun 10, 2018 at 3:33
  • 5
    I'm sorry. I thought from your reputation that you would know what I meant by a minimum working example with bibliography (MWEB). Otherwise, I would have said a bit more to explain it. Please see tex.meta.stackexchange.com/questions/4407/… for guidance as to what's needed to help people to help you in this kind of case. Basically, we want something we can copy-paste into a blank document and compile to produce your current output. This will also tell us what code should produce your desired result.
    – cfr
    Commented Jun 10, 2018 at 19:58
  • 1
    For example, Notes is not a standard .bib field. Could you also say whether Biber/Biblatex is an option for you?
    – cfr
    Commented Jun 10, 2018 at 19:59

1 Answer 1

4
+50

Do the following changes to the ACM-Reference-Format.bst file.

1) Add notes to the ENTRY.

2) define mynotes as follows

FUNCTION { format.mynotes }
{
  notes empty.or.unknown
    { "" }
    { notes * } %tie.or.space.connect
  if$
}

3) Replace the code:

FUNCTION { format.in.emphasize.booktitle }
{ % jtb: format for collections or proceedings not appearing in a journal
  booktitle empty.or.unknown
  { "" }
  { "In " format.emphasize.booktitle * }
  if$
}

by

FUNCTION { format.in.emphasize.booktitle }
{ % jtb: format for collections or proceedings not appearing in a journal
  booktitle empty.or.unknown
  { "" }
  {"" format.emphasize.booktitle * }  
  if$
}

4) replace the code

FUNCTION { inproceedings }
{
  output.bibitem
  format.authors "author" output.check
  author format.key output            % added
  output.year.check                   % added
  new.block
  format.articletitle "title" output.check
  howpublished empty.or.unknown
    { }
    { "\bibinfo{howpublished}{" howpublished "}" * * output.dot.space }
  if$
  crossref missing$
    {
      journal missing$          % jtb: proceedings appearing in journals
        { format.in.emphasize.booktitle format.city "booktitle"  output.check.dot.space
          format.series output.removenospace
          format.editors.fml output % BV 2011/09/27 Moved dot to comma
          format.bvolume.noseries output
          new.sentence
          organization output
          publisher "publisher" bibinfo.output.check % jtb: require publisher (?)
          address "address" bibinfo.output.check  % jtb: require address
          format.bookpages output
        }
        {
           format.in.booktitle format.city "booktitle" output.check
           format.editors.fml output
           new.sentence
           format.journal.volume.number.day.month.year output
        }
      if$
      format.articleno output
      format.pages.check.without.articleno output
    }
    {
      format.incoll.inproc.crossref output.nonnull
      format.articleno output
      format.pages.check.without.articleno output
    }
  if$
  format.articleno.numpages output
  fin.block
  output.issue.doi.coden.isxn.lccn.url.eprint.note
  fin.entry
}

by

FUNCTION { inproceedings }
{  
  output.bibitem
   newline$  
   format.articletitle "title" output.check
  new.block %   
  format.authors "author" output.check
    newline$  % changed
  author format.key output            % added
   new.block 
   newline$ % changed
  %% format.articletitle "title" output.check
  %newline$ % changed
          %format.mynotes output
  howpublished empty.or.unknown
    { }
    { "\bibinfo{howpublished}{" howpublished "}" * * output.dot.space
    %write$ newline$% changed 
    }
  if$
  crossref missing$
    { 
      journal missing$          % jtb: proceedings appearing in journals
        { format.in.emphasize.booktitle format.city "booktitle" output.check.dot.space
          format.series output.removenospace 
          format.editors.fml output % BV 2011/09/27 Moved dot to comma 
          format.bvolume.noseries output
          new.sentence 
          organization output
          %changed publisher "publisher" bibinfo.output.check % jtb: require publisher (?)
          newline$ % changed
          %changed address "address" bibinfo.output.check  % jtb: require address 
          format.bookpages output 
        }
        { 
           format.in.booktitle format.city "booktitle" output.check 
           format.editors.fml output
           new.sentence
           format.journal.volume.number.day.month.year output
        }
      if$
      newline$ % changed
      format.articleno output
      %format.pages.check.without.articleno output
    }
    { 
      format.incoll.inproc.crossref output.nonnull
      format.articleno output
      format.pages.check.without.articleno output
    }
  if$
  output.year.check   
  "~" write$ %* 
   newline$ %changed
  "\hspace{0em}\\" %changed  
  format.mynotes output
  format.articleno.numpages output
  fin.block
  output.issue.doi.coden.isxn.lccn.url.eprint.note
  fin.entry
}

The following MWE

\documentclass{article}
\usepackage[english]{babel}
\usepackage{hyperref}
\usepackage[natbibapa]{apacite}  
 \begin{document}
    \cite{*}
    \bibliographystyle{ACM-Reference-Format_mod} %  
    \bibliography{Library}
\end{document}

where the Library.bib file containing

@InProceedings{example,
  Title                    = {This is the paper title},
  Author                   = {John is First Author, Matt is the second Author},
  Booktitle                = {Proceedings of the Latex Conference},
  Year                     = {2018},
  Notes                    = {Acceptance Rate 5},
  Publisher                = {Publisher},
  address                   = {Adress},
  pages                   = {1988}
}

produces

enter image description here

Update: As @Mico suggested, correcting the OP's bibliography code by writing the Library.bib file as follows

@InProceedings{example,
  Title                    = {This is the paper title},
  Author                   = {Auth, John and Co-Auth, Matt},
  Booktitle                = {Proceedings of the Latex Conference},
  Year                     = {2018},
  Notes                    = {Acceptance Rate 5\%},
  Publisher                = {Publisher},
  address                   = {Adress},
  pages                   = {1988}
}

@InProceedings{example2,
  Title                    = {This is the paper title},
  Author                   = {Aut, Joe and Co-Aut, Mathew},
  Booktitle                = {Proceedings of the Latex Conference},
  Year                     = {2019},
  Notes                    = {Acceptance Rate 5\%},
  Publisher                = {Publisher},
  address                   = {Adress},
  pages                   = {1988}
}

gives:

enter image description here

1
  • 6
    Regarding the author field: Don't forget to use the keyword and as the separator between authors; don't use commas for that purpose. (I'm aware that this mistake is already contained in the OP's example code, but it should be fixed nevertheless.)
    – Mico
    Commented Jun 13, 2018 at 2:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .