这是我在这里的第一个问题。我搜索了很长时间关于这个主题的不同帖子,但仍然无法解决我的问题。
我有一份分为两个书目(例如书籍和互联网资源)的文档。在文本中,我使用 numeric-comp 样式进行引用。如果我尝试仅引用一个书目,则一切都很好,并且它会将文本中的引用正确地排列在方括号中,并且顺序良好。但是,如果我在一个地方使用两个书目进行引用,numeric-comp 无法正常工作(它按字母顺序对数字进行排序,而我想按数字排序并将其压缩为美观的视图)。我不知道该怎么做。我使用 LuaLaTeX 进行编译。
请帮忙,并提前感谢您的关注。问候约翰
\documentclass{article}
\usepackage{polski} %słownik łamania wyrazów
\usepackage{polyglossia} %obsługa języków obcych w lualatex i xelatex
\setmainlanguage{polish} %ustawienie języka polskiego w polyglossii
\usepackage{filecontents}
\begin{filecontents}{\literatura.bib}
@article{szymenderski2018simulation,
title={Simulation of pipeline random response to stray currents effects produced by DC traction system},
author={Szymenderski, Jan and Machczy{\'n}ski, Wojciech},
journal={Czasopismo Techniczne},
%volume={115},
number={10},
pages={157--170},
year={2018},
publisher={Portal Czasopism Naukowych Ejournals. eu}
}
@online{random_www,
title={Random Numbers from Normal Distribution with Specific Mean and Variance},
url = {https://www.mathworks.com/help/matlab/math/random-numbers-with-specific-mean-and-variance.html},
urldate = {2019-04-16},
}
@article{krol2019redukcja,
title={Redukcja nat{\k{e}}{\.z}enia pola elektrycznego i magnetycznego w otoczeniu napowietrznej linii elektroenergetycznej},
author={Kr{\'o}l, Krzysztof and Machczy{\'n}ski, Wojciech and Budnik, Krzysztof and Szymenderski, Jan},
journal={Poznan University of Technology Academic Journals. Electrical Engineering},
year={2019}
}
@article{budnik2015voltage,
title={Voltage induced by currents in power-line sagged conductors in nearby circuits of arbitrary configuration},
author={Budnik, Krzysztof and Machczy{\'n}ski, Wojciech and Szymenderski, Jan},
journal={Archives of electrical engineering},
volume={64},
number={2},
year={2015}
}
\end{filecontents}
\usepackage[style=iso-numeric, citestyle=numeric-comp, sorting=nty, giveninits=true, backend=biber, defernumbers=true]{biblatex}
\addbibresource{\literatura.bib}
\usepackage{csquotes}
\begin{document}
Citing from two bibliographies \cite{krol2019redukcja,random_www,szymenderski2018simulation,budnik2015voltage}
Citing from one bibliography \cite{budnik2015voltage,krol2019redukcja,szymenderski2018simulation}
\printbibheading[title={References}]
\printbibliography[nottype=online, heading=subbibliography, title={Papers}]
\printbibliography[type=online, heading=subbibliography, title={Websites}]
\end{document}
答案1
biblatex
按全局排序顺序对引文进行排序。如果您有多个带有 的参考书目defernumbers
,则全局排序顺序可能与参考文献的编号不一致。
在这种情况下,更改排序顺序以使其与参考编号一致相当容易,因为我们只需确保条目排在所有其他条目之后。这可以通过通过源映射添加到条目@online
来实现。presort = {zz},
@online
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{polish}
\usepackage{csquotes}
\usepackage[
backend=biber,
style=iso-numeric,
citestyle=numeric-comp,
sorting=nty,
defernumbers=true,
giveninits=true,
]{biblatex}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\pertype{online}
\step[fieldset=presort, fieldvalue={zz}]
}
}
}
\begin{filecontents}[force]{\jobname.bib}
@article{szymenderski2018simulation,
title = {Simulation of pipeline random response to stray currents effects produced by DC traction system},
author = {Szymenderski, Jan and Machczy{\'n}ski, Wojciech},
journal = {Czasopismo Techniczne},
%volume = {115},
number = {10},
pages = {157--170},
year = {2018},
}
@online{random_www,
title = {Random Numbers from Normal Distribution with Specific Mean and Variance},
url = {https://www.mathworks.com/help/matlab/math/random-numbers-with-specific-mean-and-variance.html},
urldate = {2019-04-16},
}
@article{krol2019redukcja,
title = {Redukcja nat{\k{e}}{\.z}enia pola elektrycznego i magnetycznego
w otoczeniu napowietrznej linii elektroenergetycznej},
author = {Kr{\'o}l, Krzysztof and Machczy{\'n}ski, Wojciech and Budnik, Krzysztof and Szymenderski, Jan},
journal = {Poznan University of Technology Academic Journals. Electrical Engineering},
year = {2019},
}
@article{budnik2015voltage,
title = {Voltage induced by currents in power-line sagged conductors
in nearby circuits of arbitrary configuration},
author = {Budnik, Krzysztof and Machczy{\'n}ski, Wojciech and Szymenderski, Jan},
journal = {Archives of electrical engineering},
volume = {64},
number = {2},
year = {2015},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
Citing from two bibliographies \cite{krol2019redukcja,random_www,szymenderski2018simulation,budnik2015voltage}
Citing from one bibliography \cite{budnik2015voltage,krol2019redukcja,szymenderski2018simulation}
\printbibheading[title={References}]
\printbibliography[nottype=online, heading=subbibliography, title={Papers}]
\printbibliography[type=online, heading=subbibliography, title={Websites}]
\end{document}