파일의 약어를 .bib
에서 참고 문헌의 순서 XYZ
로 변경하면 변경됩니다.\textbf{X}YZ
정렬 순서를 왜곡하지 않고 일부 속기가 \textbf
(특정 글자를 굵은 글꼴로)로 시작하는 속기를 어떻게 만들 수 있나요?
MWE
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[backend=biber,
style=alphabetic,
natbib=true,
sorting=ynt,
]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{xei2016asdf,
Author = {Xei, A and A, B and B, C and C, D},
Title = {asdf is asdf},
Year = {2016},
}
@article{xei2017bob,
Author = {Xei, A and A, B and B, C and C, D},
Title = {bob is bob},
Year = {2017},
}
@article{xei2017bob2,
Author = {Xei, A and A, B and B, C and C, D},
Title = {bob is bob 2},
Year = {2017},
shorthand = {\textbf{X}ei+17},
sortshorthand = {Xei+17},
}
@article{xei2017alice,
Author = {Xei, A and A, B and B, C},
Title = {alice is alice},
Year = {2017},
}
@article{xei2018alice2,
Author = {Xei, A and A, B and B, C},
Title = {alice is alice 2},
Year = {2018},
shorthand = {\textbf{X}AB18},
sortshorthand = {XAB18},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\newrefcontext[sorting=anyvt]
\cite{xei2016asdf,xei2017bob,xei2017bob2,xei2017alice,xei2018alice2}
\printbibliography
\end{document}
제안된 솔루션에 대해 한 가지 궁금증이 있습니다. 다음을 고려한다면:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[backend=biber,
style=alphabetic,
]{biblatex}
\DeclareSortingScheme{anyt}{
\sort{
\field{presort}
}
\sort{
\field{sortshorthand}
\field{labelalpha}
}
\sort[final]{
\field{sortkey}
}
\sort{
\field{sortname}
\field{author}
\field{editor}
\field{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sortyear}
\field{year}
}
\sort{
\field{sorttitle}
\field{title}
}
\sort{
\field{volume}
\literal{0}
}
}
\DeclareSortingScheme{anyvt}{
\sort{
\field{presort}
}
\sort{
\field{sortshorthand}
\field{labelalpha}
}
\sort[final]{
\field{sortkey}
}
\sort{
\field{sortname}
\field{author}
\field{editor}
\field{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sortyear}
\field{year}
}
\sort{
\field{volume}
\literal{0}
}
\sort{
\field{sorttitle}
\field{title}
}
}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{xei2016asdf,
Author = {Xei, A and A, B and B, C and C, D},
Title = {asdf is asdf},
Year = {2016},
}
@article{xei2018bob,
Author = {Xei, A and A, B and B, C and C, D},
Title = {bob is bob},
Year = {2018},
}
@article{xei2017bob2,
Author = {Xei, A and A, B and B, C and C, D},
Title = {bbob is bob 2},
Year = {2017},
shorthand = {\textbf{X}ei+17},
sortshorthand = {Xei+17},
}
@article{xei2017alice,
Author = {Xei, A and A, B and B, C},
Title = {alice is alice},
Year = {2017},
}
@article{xei2018alice2,
Author = {Xei, A and A, B and B, C},
Title = {alice is alice 2},
Year = {2018},
shorthand = {\textbf{X}AB18},
sortshorthand = {XAB18},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cite{xei2016asdf,xei2018bob,xei2017bob2,xei2017alice,xei2018alice2}
\printbibliography
\end{document}
답변1
biblatex
분야를 알고 있습니다 sortshorthand
. 그만큼biblatex
선적 서류 비치설명합니다(§2.2.3특수분야, p. 30):
[
sortshorthand
]sortkey
속기 목록과 유사하지만 사용됩니다. 있는 경우 속기 목록을 정렬할 때biblatex
대신 이 필드를 사용합니다 .shorthand
이는 속기 필드에\emph
또는 와 같은 형식 지정 명령이 포함된 속기 필드에 유용합니다\textbf
.
alphabetic
정렬 체계 의 경우 anyt
및를 anyvt
biblatex
사용하지 않습니다 (기본적으로 동일한 규칙에 따라 작성되지만 필드에 우선 순위를 부여하는 a 및 a 를 sortshorthand
추적하는 것을 의미하므로 ).labelalpha
sortlabelalpha
sort...
표준 설정( 후자가 존재하는 경우 labelalpha
로 설정)을 사용하면 정렬 구성표 앞에 shorthand
추가하는 것으로 충분합니다 .\field{sortshorthand}
\field{labelalpha}
MWE는 두 정렬 체계를 모두 재정의하지만 둘 중 하나만 사용하는 경우 다른 하나를 삭제할 수 있습니다.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[backend=biber,
style=alphabetic,
]{biblatex}
\DeclareSortingTemplate{anyt}{
\sort{
\field{presort}
}
\sort{
\field{sortshorthand}
\field{labelalpha}
}
\sort[final]{
\field{sortkey}
}
\sort{
\field{sortname}
\field{author}
\field{editor}
\field{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sortyear}
\field{year}
}
\sort{
\field{sorttitle}
\field{title}
}
\sort{
\field{volume}
\literal{0}
}
}
\DeclareSortingTemplate{anyvt}{
\sort{
\field{presort}
}
\sort{
\field{sortshorthand}
\field{labelalpha}
}
\sort[final]{
\field{sortkey}
}
\sort{
\field{sortname}
\field{author}
\field{editor}
\field{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sortyear}
\field{year}
}
\sort{
\field{volume}
\literal{0}
}
\sort{
\field{sorttitle}
\field{title}
}
}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{xei2016asdf,
Author = {Xei, A and A, B and B, C and C, D},
Title = {asdf is asdf},
Year = {2016},
}
@article{xei2017bob,
Author = {Xei, A and A, B and B, C and C, D},
Title = {bob is bob},
Year = {2017},
}
@article{xei2017bob2,
Author = {Xei, A and A, B and B, C and C, D},
Title = {bob is bob 2},
Year = {2017},
shorthand = {\textbf{X}ei+17},
sortshorthand = {Xei+17},
}
@article{xei2017alice,
Author = {Xei, A and A, B and B, C},
Title = {alice is alice},
Year = {2017},
}
@article{xei2018alice2,
Author = {Xei, A and A, B and B, C},
Title = {alice is alice 2},
Year = {2018},
shorthand = {\textbf{X}AB18},
sortshorthand = {XAB18},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cite{xei2016asdf,xei2017bob,xei2017bob2,xei2017alice,xei2018alice2}
\printbibliography
\end{document}