zepinglee / gbt7714-bibtex-style

GB/T 7714-2015 BibTeX Style
LaTeX Project Public License v1.3c
1.17k stars 196 forks source link

格式可以自定义吗? #30

Closed redleafnew closed 6 years ago

redleafnew commented 6 years ago

请问格式可以像 https://github.com/hushidong/biblatex-gb7714-2015 说的那样自定义吗? 如把英文的作者姓名只是首字母大小,不显示网址和DOI等。 谢谢。 另外,作者怎么联系?

zepinglee commented 6 years ago

BibLaTeX 可以在 latex 代码中自定义样式,但是 BibTeX 只能修改 bst 代码。

目前本项目的 master 已经可以方便地通过修改 bst,比如 https://github.com/zepinglee/gbt7714-bibtex-style/blob/0027531019b8cf4db3611a1a556ef15bb1b37eb3/gbt7714-plain.bst#L34 这里改成 #0 就不再将姓名转为全大写。

但是 print.urlprint.doi 可能还有些问题,比如设置了不显示 url 时:

  1. 文献载体标识还是会自动添加 “/OL”
  2. 引用的网页 online 是必须有 url 的,在这种情况下也会不显示 url

如果还有其他问题欢迎反馈

redleafnew commented 6 years ago

谢谢您的及时仔细回复。

DOI和URL这两个问题好 解决吗?

Best regards!

redleafnew commented 6 years ago

另外,这个能生成[1-3]这种格式吗?我附件里生成的只是[1][2][3]这种格式。 谢谢。

Best regards!

Sincerely, Minyi Han

zepinglee commented 6 years ago

URL 和 DOI 有点麻烦,需要些时间;

如果你使用了 sty,默认就是 [1-3] 的格式

redleafnew commented 6 years ago

期待早日用上。

我刚开始用latex.,你说使用sty是指什么? 是指 \usepackage[super]{gbt7714} \bibliographystyle{gbt7714} 吗?

是否还需要前面的\usepackage

我用上面的编译出来还是[1][2][3]

附:

\documentclass[UTF8]{ctexart} \usepackage[super]{gbt7714} \bibliographystyle{gbt7714} \begin{document}

研究不同巴氏杀菌条件对产品感官影响\cite{liu_changes_2007}\cite{jayasena_effect_2014}\cite{yan2011-11}。杀菌条件对产品

\bibliography{book} \end{document}

Best regards!

Sincerely, Minyi Han No 1#, Weigang, Nanjing, 210095, P. R. China College of Food Science & Technology Nanjing Agricultural University

发件人: Zeping Lee 发送时间: 2018-06-05 10:15 收件人: zepinglee/gbt7714-bibtex-style 抄送: redleafnew; Author 主题: Re: [zepinglee/gbt7714-bibtex-style] 格式可以自定义吗? (#30) URL 和 DOI 有点麻烦,需要些时间; 如果你使用了 sty,默认就是 [1-3] 的格式 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

zepinglee commented 6 years ago

见 readme.md,应该写为:

\usepackage{gbt7714} % super 是默认的,不加也行
% 不需要 \bibliographystyle{gbt7714}
...
\cite{liu_changes_2007,jayasena_effect_2014,yan2011-11} 这样写才能连起来
redleafnew commented 6 years ago

完美实现,谢谢了。

期待早日解决DOI和URL的问题。

Best regards!

Sincerely, Minyi Han

zepinglee commented 6 years ago

在 c6fbadf 中修复,你测试一下

redleafnew commented 6 years ago

谢谢老大,倒是可以去掉DOI和URL了,但去掉后,现在最末的是日期了,以前有DOI和URL的时候没有注意,去掉后很显眼了,能去掉吗?

另外,是不是要同时修改gbt7714-plain.bst和gbt7714-unsrt.bst中的内容,重新编译才会起作用。 还有,在哪可以控制显示最多作者的数量,现在应该是3个吧,超过3个显示et al或等,有的期刊要求写出所有作者,这个在哪修改?

要求比较多,谢谢啊。 这个东西真的不错。

Best regards!

Sincerely, Minyi Han No 1#, Weigang, Nanjing, 210095, P. R. China College of Food Science & Technology Nanjing Agricultural University

发件人: Zeping Lee 发送时间: 2018-06-05 14:38 收件人: zepinglee/gbt7714-bibtex-style 抄送: redleafnew; Author 主题: Re: [zepinglee/gbt7714-bibtex-style] 格式可以自定义吗? (#30) 在 c6fbadf 中修复,你测试一下 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

zepinglee commented 6 years ago
  1. 给个例子看一下?最好附上 bib 的内容。

  2. 你要是用“顺序编码制”,只需改 unsrt 就可以了,“著者-出版年”需要改 plain。

  3. GB/T 7714-2015 规定的是 3 个,期刊是在此基础上有额外要求是吧?

zepinglee commented 6 years ago

6383a35 新加了一个 max.num.auhtors,你把 #3 改大一点就好了

redleafnew commented 6 years ago

[1] Liu Y, Xu X l, Zhou G h. Changes in taste compounds of duck during processing[J]. Food Chemistry, 2007, 102(1):22-26[2018-05-29]. [2] Jayasena D D, Jung S, Kim H J, et al. Effect of sex on flavor-related and functional compounds in freeze-dried broth made from korean native chicken[J]. Korean Journal for Food Science of Animal Resources, 2014, 34(4):448-456[2018-05-30].

bib:

@article{liu_changes_2007,
    title = {Changes in taste compounds of duck during processing},
    volume = {102},
    issn = {0308-8146},
    url = {http://www.sciencedirect.com/science/article/pii/S0308814606002627},
    doi = {10.1016/j.foodchem.2006.03.034},
    abstract = {Nanjing cooked duck is one of the few low temperature cooked meat products in traditional Chinese featured meat products. It is famous for its delicate processing, savoury, and tender flavour. Taste compounds of Nanjing cooked duck during processing, namely free amino acids, peptides and nucleotides, were analyzed. During boiling, both free amino acids and flavour nucleotides decreased significantly. Most peptides decreased during processing and the changes of total peptides were consistent with the nucleotides. Results showed that the special processes before boiling, especially brining, produced an increased of effect on the taste compounds, which could be the reason for the savoury taste of Nanjing cooked duck.},
    number = {1},
    urldate = {2018-05-29},
    journal = {Food Chemistry},
    author = {Liu, Yuan and Xu, Xing-lian and Zhou, Guang-hong},
    month = jan,
    year = {2007},
    keywords = {Cooked duck, Free amino acids, Nucleotides, Peptides, Taste compounds},
    pages = {22--26}
}

@article{jayasena_effect_2014,
    title = {Effect of sex on flavor-related and functional compounds in freeze-dried broth made from korean native chicken},
    volume = {34},
    issn = {2234-246X},
    url = {https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4662148/},
    doi = {10.5851/kosfa.2014.34.4.448},
    abstract = {Studies on the flavour characteristics of meat-based broth, quantification of flavour-related and functional compounds, and factors affecting the availability of such compounds are minimal. The present study was designed to determine the effects of sex on flavor-related and functional compounds in freeze-dried broth (FDB) made from Korean native chickens (KNC). Male and female KNC from a commercial strain (WoorimatdagTM) were reared under similar commercial conditions. FDB was separately prepared using male and female birds aged 100 d (six birds of each sex) and analyzed for nucleotide, free amino acid, betaine, carnitine, carnosine, anserine, and creatine contents, and fatty acid composition. The levels of betaine, carnitine and creatine in FDB were not significantly different between the two sexes (p{\textgreater}0.05) in KNC. Carnosine and anserine were not detected in FDB samples. However, FDB from female chickens had significantly higher inosine-5-monophosphate and arachidonic acid contents than did FDB from male chickens. FDB prepared with male KNC contained higher levels of inosine, linoleic acid, glycine, alanine, lysine, and serine (p{\textless}0.05). However, glutamic acid, oleic acid, and DHA were present in comparable amounts (p{\textgreater}0.05) in FDB made from male and female KNC. Our findings suggest that the sex of KNC has significant effect on the contents of flavor-related compounds, but not functional compounds.},
    number = {4},
    urldate = {2018-05-30},
    journal = {Korean Journal for Food Science of Animal Resources},
    author = {Jayasena, Dinesh D. and Jung, Samooel and Kim, Hyun Joo and Alahakoon, Amali U. and Nam, Ki Chang and Jo, Cheorun},
    year = {2014},
    pmid = {26761282},
    pmcid = {PMC4662148},
    pages = {448--456},
    file = {Jayasena et al_2014_Effect of Sex on Flavor-related and Functional Compounds in Freeze-dried Broth.pdf:F\:\\?ҵļ?????\\references\\Jayasena et al_2014_Effect of Sex on Flavor-related and Functional Compounds in Freeze-dried Broth.pdf:application/pdf}
}
zepinglee commented 6 years ago

有道理,不显示 url 的时候,urldate 也没必要显示

zepinglee commented 6 years ago

在 0c0b3c7 中修复

redleafnew commented 6 years ago

不错,不错。 还有一个要求,能否实现姓名的全部拼写,如Zhou, Guang-hong不缩写为Zhou G-h或Zhou G;Liu, Yuan不缩写为Liu Y。这样就更完美了。

zepinglee commented 6 years ago

screen shot 2018-06-06 at 10 51 35 am

按照标准,author = {Zhou, Guang Hong} 应该著录为“ZHOU G H” 或“ZHOU Guanghong”,但是问题在于,BibTeX 无法区分这是西文姓名还是拼音,所以统一按照“ZHOU G H”的格式,就比较容易实现。

如果想要“ZHOU Guanghong”的格式,可以在 bib 中用大括号括起来:author = {Zhou, {Guanghong}},这样 BibTeX 就不再处理里面那层大括号里内容的格式。但是注意这样 bib 就不再是通用的,因为使用其他 bst 可能会导致格式不正确,比如某期刊要求“A. Einstein” 的格式,这样的 bib 就会得到“Guanghong. Zhou”

redleafnew commented 6 years ago

好的,谢谢。要求过分了。