这是一个后续问题Biblatex:向期刊投稿并Biblatex:包括 bbl,“动词”字段的问题。
我正在使用biblatex 自然风格,使用了\verb
很多,导致使用时出现编译错误此解决方案。 我试过Ulrike 的解决方案,但代码使用 pdfLaTeX/Biber (TeXLive 2016) 根本不会生成任何参考书目。如果参考文献存储在 bib 文件中并通过 包含\addbibresource{}
,则它会生成漂亮的参考书目。附加了一个 MWE 来说明这个问题。
我不确定“all tex”失败是否是由我使用的某些 biblatex 选项引起的;它们中的大多数似乎是满足期刊规范所必需的,但可能不是全部。我有 700 多个参考文献,所以@Herbert 的手动格式修复是不切实际的。
我将非常感激任何有关如何实现这一点的见解。遗憾的是,该期刊不接受任何 bibtex 或 biblatex 辅助文件。
\documentclass[english]{article}
\usepackage{babel}
\usepackage{amsmath,url}
\usepackage{graphicx,fancyhdr,lineno}
\usepackage{filecontents}
\usepackage[style=nature,date=year,backend=biber,natbib=true,doi=false,defernumbers=true]{biblatex}
\AtEveryBibitem{\clearfield{issue}}
\AtEveryBibitem{\clearfield{issn}}
\AtEveryCitekey{\clearfield{issn}}
\AtEveryBibitem{\clearfield{isbn}}
\AtEveryCitekey{\clearfield{isbn}}
\DeclareCiteCommand{\citenum}
{}
{\printfield{labelnumber}}
{}
{}
% define bib resources
\begin{filecontents}{mybib.bbl}
\refsection{0}
\sortlist{entry}{nty}
\entry{A1}{article}{}
\name{author}{1}{}{%
{{hash=6336f16c9082808449bbd32fdb646d7e}{%
family={{\relax PAGES2k Consortium}},
familyi={{\relax PAGES2k Consortium}\bibinitperiod}}}%
}
\list{publisher}{1}{%
{Nature Publishing Group, a division of Macmillan Publishers Limited. All Rights Reserved.}%
}
\strng{namehash}{6336f16c9082808449bbd32fdb646d7e}
\strng{fullhash}{6336f16c9082808449bbd32fdb646d7e}
\strng{authornamehash}{6336f16c9082808449bbd32fdb646d7e}
\strng{authorfullhash}{6336f16c9082808449bbd32fdb646d7e}
\field{sortinit}{5}
\field{sortinithash}{c9df3c9fb8f555dd9201cedc5e343021}
\field{labelnamesource}{author}
\field{labeltitlesource}{title}
\field{isbn}{1752-0894}
\field{journaltitle}{Nature Geoscience}
\field{month}{05}
\field{number}{5}
\field{title}{Continental-scale temperature variability during the past two millennia}
\field{volume}{6}
\field{year}{2013}
\field{pages}{339\bibrangedash 346}
\range{pages}{8}
\verb{doi}
\verb 10.1038/ngeo1797
\endverb
\verb{url}
\verb http://dx.doi.org/10.1038/ngeo1797
\endverb
\endentry
\entry{A2}{online}{}
\name{author}{1}{}{%
{{hash=6190cb5961651414f637857f879c5cb3}{%
family={{\relax PAGES 2k Consortium}},
familyi={{\relax PAGES 2k Consortium}\bibinitperiod}}}%
}
\strng{namehash}{6190cb5961651414f637857f879c5cb3}
\strng{fullhash}{6190cb5961651414f637857f879c5cb3}
\strng{authornamehash}{6190cb5961651414f637857f879c5cb3}
\strng{authorfullhash}{6190cb5961651414f637857f879c5cb3}
\field{sortinit}{6}
\field{sortinithash}{02bbed3ed82f61ae046619460488516d}
\field{labelnamesource}{author}
\field{labeltitlesource}{title}
\field{howpublished}{FigShare}
\field{title}{A really nice data citation}
\field{urlyear}{2017}
\field{urldateera}{ce}
\verb{doi}
\verb 10.6084/123.456mwe
\endverb
\verb{url}
\verb https://figshare.com/s/12345678
\endverb
\endentry
\endsortlist
\endrefsection
\end{filecontents}
%-------------- start insert modified commands ------------------
\makeatletter
\def\blx@bblfile@biber{%
\blx@secinit
\begingroup
\blx@bblstart
\input{mybib.bbl}%<------------
\blx@bblend
\endgroup
\csnumgdef{blx@labelnumber@\the\c@refsection}{0}}
\makeatother
%-------------- end insert modified commands ------------------
\begin{document}
In this paper, we have regular citations \cite{A1} and data citations \cite{A2}. Both are important.
% %%%%%%%%% Citations %%%%%%%%%%%%%%%%%
\printbibliography[title={References},nottype=online,resetnumbers=true]
\printbibliography[title={Data citations},type=online,resetnumbers=true]
\end{document}
答案1
biblatex 的内部命令已更改。\blx@bblfile@biber
不再存在。您可以尝试以下方法。
- 使用
filecontents*
环境而不是filecontents
。 - 添加一切来自.bbl——包括开始的注释。
使用以下重新定义
\makeatletter \def\blx@bblinput{% \begingroup \blx@info@noline{Trying to load bibliographic data..}% \blx@blxinit \def\jobname{mybib}% added \blx@bblfile \endgroup} \makeatother
答案2
你要
\makeatletter
\def\blx@bblfile{%
\blx@secinit
\begingroup
\blx@bblstart
\input{mybib.bbl}%
\blx@bblend
\endgroup
% global sorting as this is called at BeginDocument
\csnumgdef{blx@labelnumber@\the\c@refsection}{0}}
\makeatother
请注意,内部命令已被重命名。
您还需要复制.bbl
正确格式的文件。对于biblatex
3.7/Biber 2.7,您的设置是
\documentclass[english]{article}
\usepackage{babel}
\usepackage{amsmath,url}
\usepackage{graphicx,fancyhdr,lineno}
\usepackage{filecontents}
\usepackage[style=nature,date=year,backend=biber,natbib=true,doi=false,defernumbers=true]{biblatex}
\AtEveryBibitem{\clearfield{issue}}
\AtEveryBibitem{\clearfield{issn}}
\AtEveryCitekey{\clearfield{issn}}
\AtEveryBibitem{\clearfield{isbn}}
\AtEveryCitekey{\clearfield{isbn}}
\DeclareCiteCommand{\citenum}
{}
{\printfield{labelnumber}}
{}
{}
% define bib resources
\begin{filecontents}{mybib.bbl}
\refsection{0}
\sortlist[entry]{none/global/}
\entry{A1}{article}{}
\name{author}{1}{}{%
{{hash=6336f16c9082808449bbd32fdb646d7e}{%
family={{\relax PAGES2k Consortium}},
familyi={{\relax PAGES2k Consortium}\bibinitperiod}}}%
}
\list{publisher}{1}{%
{Nature Publishing Group, a division of Macmillan Publishers Limited. All Rights Reserved.}%
}
\strng{namehash}{6336f16c9082808449bbd32fdb646d7e}
\strng{fullhash}{6336f16c9082808449bbd32fdb646d7e}
\strng{authornamehash}{6336f16c9082808449bbd32fdb646d7e}
\strng{authorfullhash}{6336f16c9082808449bbd32fdb646d7e}
\field{sortinit}{5}
\field{sortinithash}{c9df3c9fb8f555dd9201cedc5e343021}
\field{labelnamesource}{author}
\field{labeltitlesource}{title}
\field{isbn}{1752-0894}
\field{journaltitle}{Nature Geoscience}
\field{month}{05}
\field{number}{5}
\field{title}{Continental-scale temperature variability during the past two millennia}
\field{volume}{6}
\field{year}{2013}
\field{pages}{339\bibrangedash 346}
\range{pages}{8}
\verb{doi}
\verb 10.1038/ngeo1797
\endverb
\verb{url}
\verb http://dx.doi.org/10.1038/ngeo1797
\endverb
\endentry
\entry{A2}{online}{}
\name{author}{1}{}{%
{{hash=6190cb5961651414f637857f879c5cb3}{%
family={{\relax PAGES 2k Consortium}},
familyi={{\relax PAGES 2k Consortium}\bibinitperiod}}}%
}
\strng{namehash}{6190cb5961651414f637857f879c5cb3}
\strng{fullhash}{6190cb5961651414f637857f879c5cb3}
\strng{authornamehash}{6190cb5961651414f637857f879c5cb3}
\strng{authorfullhash}{6190cb5961651414f637857f879c5cb3}
\field{sortinit}{6}
\field{sortinithash}{02bbed3ed82f61ae046619460488516d}
\field{labelnamesource}{author}
\field{labeltitlesource}{title}
\field{howpublished}{FigShare}
\field{title}{A really nice data citation}
\field{urlyear}{2017}
\field{urldateera}{ce}
\verb{doi}
\verb 10.6084/123.456mwe
\endverb
\verb{url}
\verb https://figshare.com/s/12345678
\endverb
\endentry
\endsortlist
\endrefsection
\endinput
\end{filecontents}
%-------------- start insert modified commands ------------------
\makeatletter
\def\blx@bblfile{%
\blx@secinit
\begingroup
\blx@bblstart
\input{mybib.bbl}%
\blx@bblend
\endgroup
% global sorting as this is called at BeginDocument
\csnumgdef{blx@labelnumber@\the\c@refsection}{0}}
\makeatother
%-------------- end insert modified commands ------------------
\begin{document}
In this paper, we have regular citations \cite{A1} and data citations \cite{A2}. Both are important.
% %%%%%%%%% Citations %%%%%%%%%%%%%%%%%
\printbibliography[title={References},nottype=online,resetnumbers=true]
\printbibliography[title={Data citations},type=online,resetnumbers=true]
\end{document}
请注意\sortlist[entry]{none/global/}
。
答案3
我已经发布了另一种不需要太多黑魔法的技术作为答案Biblatex:向期刊投稿