乳胶分选参考书目
Latex sorting bibliography
我有一段代码可以从 .bib 文件中按日期和类型对我的参考书目进行排序。它工作得很好,但是我被要求提供我的参考书目,从 1996 年开始,即跳过所有内容 before.any 帮助修改什么以添加此条件?谢谢
对于 .bib 文件,请将网上找到的以下测试保存在文件中,这是要排序的数据库的示例:
%%%%%%%%%%% mybib.bib %%%%%%%%%%%%%%%%%%%
@BOOK{HK,
AUTHOR={H. Kopka and P. W. Daly},
TITLE={A Guide to LaTeX},
PUBLISHER={Addison-Wesley},
ADDRESS={Reading, MA},
YEAR=1999.
}
@BOOK{MG,
AUTHOR={M. Goossens and F. Mittelbach and A. Samarin},
TITLE={A LaTeX Companion},
PUBLISHER={Addison-Wesley},
ADDRESS={Reading, MA},
YEAR=1994.
}
@ARTICLE{Pan,
AUTHOR={D. Pan},
TITLE={A Tutorial on MPEG/Audio Compression},
JOURNAL={IEEE Multimedia},
YEAR={1995},
VOLUME= {2} ,
PAGES={60-74},
MONTH={Summer}.
}
@INPROCEEDINGS{Boney96,
AUTHOR={L. Boney and A. H. Tewfik and K. N. Hamdy},
TITLE={Digital Watermarks for Audio Signals},
booktitle={Proceedings of the Third IEEE International Conference on
Multimedia},
PAGES={473-480},
MONTH={June},
YEAR={1996}.
}
%%%%%%%%%%%%% end %%%%%%%%%%%%%%%%%%%%%
\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage[backend=biber,sorting=ddatent,style=phys, defernumbers=true, natbib=true, isbn=true]{biblatex}
%sorting by date
\DeclareSortingScheme{ddatent}{
\sort{
\field{presort}
}
\sort[final]{
\field{sortkey}
}
\sort[direction=descending]{
\field[strside=left,strwidth=4]{sortyear}
\field[strside=left,strwidth=4]{year}
\literal{9999}
}
\sort[direction=descending]{
\field[padside=left,padwidth=2,padchar=0]{month}
\literal{00}
}
\sort[direction=descending]{
\field[padside=left,padwidth=2,padchar=0]{day}
\literal{00}
}
\sort[direction=descending]{
\field[padside=left,padwidth=4,padchar=0]{volume}
\literal{9999}
}
\sort{
\name{sortname}
\name{author}
\name{editor}
\name{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sorttitle}
\field{title}
}
}
\addbibresource{mybib.bib}
\begin{document}
\printbibliography[heading=none,type=book]
\printbibliography[heading=none,type=article]
\end{document} `
您不得在参赛作品的末尾使用 .
。
回到你的实际问题:你可以定义bibcheck
:
\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage[backend=biber,sorting=ddatent,style=phys, defernumbers=true, natbib=true, isbn=true]{biblatex}
%sorting by date
\DeclareSortingScheme{ddatent}{
\sort{
\field{presort}
}
\sort[final]{
\field{sortkey}
}
\sort[direction=descending]{
\field[strside=left,strwidth=4]{sortyear}
\field[strside=left,strwidth=4]{year}
\literal{9999}
}
\sort[direction=descending]{
\field[padside=left,padwidth=2,padchar=0]{month}
\literal{00}
}
\sort[direction=descending]{
\field[padside=left,padwidth=2,padchar=0]{day}
\literal{00}
}
\sort[direction=descending]{
\field[padside=left,padwidth=4,padchar=0]{volume}
\literal{9999}
}
\sort{
\name{sortname}
\name{author}
\name{editor}
\name{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sorttitle}
\field{title}
}
}
\begin{filecontents*}[overwrite]{\jobname.bib}
%%%%%%%%%%% mybib.bib %%%%%%%%%%%%%%%%%%%
@BOOK{HK,
AUTHOR={H. Kopka and P. W. Daly},
TITLE={A Guide to LaTeX},
PUBLISHER={Addison-Wesley},
ADDRESS={Reading, MA},
YEAR=1999,
}
@BOOK{MG,
AUTHOR={M. Goossens and F. Mittelbach and A. Samarin},
TITLE={A LaTeX Companion},
PUBLISHER={Addison-Wesley},
ADDRESS={Reading, MA},
YEAR=1994,
}
@ARTICLE{Pan,
AUTHOR={D. Pan},
TITLE={A Tutorial on MPEG/Audio Compression},
JOURNAL={IEEE Multimedia},
YEAR={1995},
VOLUME= {2} ,
PAGES={60-74},
MONTH={Summer},
}
@INPROCEEDINGS{Boney96,
AUTHOR={L. Boney and A. H. Tewfik and K. N. Hamdy},
TITLE={Digital Watermarks for Audio Signals},
booktitle={Proceedings of the Third IEEE International Conference on
Multimedia},
PAGES={473-480},
MONTH={June},
YEAR={1996},
}
%%%%%%%%%%%%% end %%%%%%%%%%%%%%%%%%%%%
\end{filecontents*}
\addbibresource{\jobname.bib}
\defbibcheck{recent}{%
\iffieldint{year}
{\ifnumless{\thefield{year}}{1996}
{\skipentry}
{}}
{\skipentry}}
\begin{document}
\nocite{*}
\printbibliography[heading=none,type=book,check=recent]
\printbibliography[heading=none,type=article,check=recent]
\end{document} `
我有一段代码可以从 .bib 文件中按日期和类型对我的参考书目进行排序。它工作得很好,但是我被要求提供我的参考书目,从 1996 年开始,即跳过所有内容 before.any 帮助修改什么以添加此条件?谢谢 对于 .bib 文件,请将网上找到的以下测试保存在文件中,这是要排序的数据库的示例:
%%%%%%%%%%% mybib.bib %%%%%%%%%%%%%%%%%%%
@BOOK{HK,
AUTHOR={H. Kopka and P. W. Daly},
TITLE={A Guide to LaTeX},
PUBLISHER={Addison-Wesley},
ADDRESS={Reading, MA},
YEAR=1999.
}
@BOOK{MG,
AUTHOR={M. Goossens and F. Mittelbach and A. Samarin},
TITLE={A LaTeX Companion},
PUBLISHER={Addison-Wesley},
ADDRESS={Reading, MA},
YEAR=1994.
}
@ARTICLE{Pan,
AUTHOR={D. Pan},
TITLE={A Tutorial on MPEG/Audio Compression},
JOURNAL={IEEE Multimedia},
YEAR={1995},
VOLUME= {2} ,
PAGES={60-74},
MONTH={Summer}.
}
@INPROCEEDINGS{Boney96,
AUTHOR={L. Boney and A. H. Tewfik and K. N. Hamdy},
TITLE={Digital Watermarks for Audio Signals},
booktitle={Proceedings of the Third IEEE International Conference on
Multimedia},
PAGES={473-480},
MONTH={June},
YEAR={1996}.
}
%%%%%%%%%%%%% end %%%%%%%%%%%%%%%%%%%%%
\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage[backend=biber,sorting=ddatent,style=phys, defernumbers=true, natbib=true, isbn=true]{biblatex}
%sorting by date
\DeclareSortingScheme{ddatent}{
\sort{
\field{presort}
}
\sort[final]{
\field{sortkey}
}
\sort[direction=descending]{
\field[strside=left,strwidth=4]{sortyear}
\field[strside=left,strwidth=4]{year}
\literal{9999}
}
\sort[direction=descending]{
\field[padside=left,padwidth=2,padchar=0]{month}
\literal{00}
}
\sort[direction=descending]{
\field[padside=left,padwidth=2,padchar=0]{day}
\literal{00}
}
\sort[direction=descending]{
\field[padside=left,padwidth=4,padchar=0]{volume}
\literal{9999}
}
\sort{
\name{sortname}
\name{author}
\name{editor}
\name{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sorttitle}
\field{title}
}
}
\addbibresource{mybib.bib}
\begin{document}
\printbibliography[heading=none,type=book]
\printbibliography[heading=none,type=article]
\end{document} `
您不得在参赛作品的末尾使用 .
。
回到你的实际问题:你可以定义bibcheck
:
\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage[backend=biber,sorting=ddatent,style=phys, defernumbers=true, natbib=true, isbn=true]{biblatex}
%sorting by date
\DeclareSortingScheme{ddatent}{
\sort{
\field{presort}
}
\sort[final]{
\field{sortkey}
}
\sort[direction=descending]{
\field[strside=left,strwidth=4]{sortyear}
\field[strside=left,strwidth=4]{year}
\literal{9999}
}
\sort[direction=descending]{
\field[padside=left,padwidth=2,padchar=0]{month}
\literal{00}
}
\sort[direction=descending]{
\field[padside=left,padwidth=2,padchar=0]{day}
\literal{00}
}
\sort[direction=descending]{
\field[padside=left,padwidth=4,padchar=0]{volume}
\literal{9999}
}
\sort{
\name{sortname}
\name{author}
\name{editor}
\name{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sorttitle}
\field{title}
}
}
\begin{filecontents*}[overwrite]{\jobname.bib}
%%%%%%%%%%% mybib.bib %%%%%%%%%%%%%%%%%%%
@BOOK{HK,
AUTHOR={H. Kopka and P. W. Daly},
TITLE={A Guide to LaTeX},
PUBLISHER={Addison-Wesley},
ADDRESS={Reading, MA},
YEAR=1999,
}
@BOOK{MG,
AUTHOR={M. Goossens and F. Mittelbach and A. Samarin},
TITLE={A LaTeX Companion},
PUBLISHER={Addison-Wesley},
ADDRESS={Reading, MA},
YEAR=1994,
}
@ARTICLE{Pan,
AUTHOR={D. Pan},
TITLE={A Tutorial on MPEG/Audio Compression},
JOURNAL={IEEE Multimedia},
YEAR={1995},
VOLUME= {2} ,
PAGES={60-74},
MONTH={Summer},
}
@INPROCEEDINGS{Boney96,
AUTHOR={L. Boney and A. H. Tewfik and K. N. Hamdy},
TITLE={Digital Watermarks for Audio Signals},
booktitle={Proceedings of the Third IEEE International Conference on
Multimedia},
PAGES={473-480},
MONTH={June},
YEAR={1996},
}
%%%%%%%%%%%%% end %%%%%%%%%%%%%%%%%%%%%
\end{filecontents*}
\addbibresource{\jobname.bib}
\defbibcheck{recent}{%
\iffieldint{year}
{\ifnumless{\thefield{year}}{1996}
{\skipentry}
{}}
{\skipentry}}
\begin{document}
\nocite{*}
\printbibliography[heading=none,type=book,check=recent]
\printbibliography[heading=none,type=article,check=recent]
\end{document} `