Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

参考文献会议论文集页码前分隔符应使用冒号 #100

Open
Xm798 opened this issue Mar 26, 2023 · 3 comments
Open

参考文献会议论文集页码前分隔符应使用冒号 #100

Xm798 opened this issue Mar 26, 2023 · 3 comments

Comments

@Xm798
Copy link

Xm798 commented Mar 26, 2023

例如:

xx[C]. Proceedings of 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). IEEE, 2018. 8499–8504.

学校要求:

[C]. Proceedings of 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). IEEE, 2018: 8499-8504.
@2foil
Copy link

2foil commented May 19, 2023

@yzwduck 呼叫大佬

@yzwduck
Copy link
Contributor

yzwduck commented May 19, 2023

抱歉漏看了邮件.. 以及我刚刚才入门了 bst 语法, 下面给的方法对 op 提到的那篇文章 (的 Google 给的 bibtex) 有测试过, 如果有输出预期外的结果, 请贴上 bibtex 原文和预期输出结果, 以方便我调整代码 (或者同样读一下 Tame the BeaST -- The B to X of BibTEX 来 DIY).

需要修改的是 nuaabib.bst 里的 FUNCTION {inproceedings}, 修改后的内容如下:

FUNCTION {inproceedings}
{ output.bibitem
  format.authors "author" output.check
  new.block
  format.title "[C]. " * title output.check
  new.block
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.noperiodcheck
      format.bvolume output
      address empty$
    { organization publisher new.sentence.checkb
      organization output
      publisher output
      year
      pages empty$ { "" } { ":" } if$ *
      format.pages * output
    }
    { %address output.nonnull
      format.address.publisher output
      year output
      new.sentence
      organization output
      new.block
      format.pages output
    }
      if$
    }
    { format.incoll.inproc.crossref output.nonnull
      format.pages output
    }
  if$
  new.block
  note output
  fin.entry
}

@2foil
Copy link

2foil commented May 20, 2023

感谢大佬提供参考。

测试了一下,需要把修改的语句
pages empty$ { "" } { ":" } if$ * format.pages * output
移到
address empty${...}{...} if$
后面,
这样才能同时覆盖address empty$的两个分支。

修改如下:

FUNCTION {inproceedings}
{ output.bibitem
  format.authors "author" output.check
  new.block
  format.title "[C]. " * title output.check
  %format.title "title" output.check
  new.block
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.noperiodcheck
      format.bvolume output
      address empty$
        { organization publisher new.sentence.checkb
          organization output
          publisher output
          year output
        }
        { %address output.nonnull
          format.address.publisher output
          year output
          new.sentence
          organization output
        }
      if$
      new.block
      pages empty$ { "" } { ":" } if$ * format.pages * output
    }
    { format.incoll.inproc.crossref output.nonnull
      format.pages output
    }
  if$
  new.block
  note output
  fin.entry
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants