나는 MR, Zbl 및 arxiv, 때로는 doi에 대한 하이퍼링크를 포함하는 멋진 형식의 참고 문헌을 일부 텍스트에서 여러 번 보았습니다.이 종이):
- 보리스 알바르와 다니엘 곤살베스. Kr-minor 자유 그래프의 삼각형. 2013. arXiv:1304.5468.
- 가와라바야시 켄이치와 송지샤. 독립 번호와 파벌 미성년자. J. 그래프 이론, 56(3):219–226, 2007. doi:10.1002/jgt.20268. 씨:2355127.
- Alexandr V. Kostochka. 주어진 평균 꼭지점 수준을 갖는 그래프의 최소 Hadwiger 수입니다. 메토디 디스크렛. 분석, 38:37–58, 1982. MR:0713722, Zbl:0544.05037.
그런 것을 얻으려면 어떤 BibTeX 스타일을 사용할 수 있습니까? 어떤 필드가 사용되며 형식은 어떻게 지정됩니까?
BibTeX 없이 수동으로 이 작업을 수행하려면 어떻게 해야 합니까?
답변1
biblatex
이런 일을 아주 잘해요.
biblatex
각 항목에 대해 하나의 대상만 eprint
지정할 수 있으므로 다양한 전자 인쇄 유형 각각에 대해 새 필드를 생성하겠습니다.
biblatex
이에 대한 축어적 필드를 제공하고 모든 항목 유형에 대해 활성화하도록 요청해야 합니다 . * 이는 데이터모델( ) 파일을 통해 수행됩니다 .dbx
. 해당 파일은 아래 예에서 생성됩니다 filecontents
. 실제로는 그렇게 하지 않고 .dbx
TeX가 찾을 수 있는 위치에 파일을 복사하면 됩니다.
파일을 호출하겠습니다.ext-eprint.dbx
\ProvidesFile{ext-eprint.dbx}[2016/09/11 extended stand-alone eprint fields]
\DeclareDatamodelFields[type=field,datatype=verbatim]{arxiv,mr,zbl,jstor,hdl,pubmed,googlebooks,pmcid}
\DeclareDatamodelEntryfields{arxiv,mr,zbl,jstor,hdl,pubmed,googlebooks,pmcid}
\DeclareDatamodelFields[type=field,datatype=literal]{arxivclass}
\DeclareDatamodelEntryfields{arxivclass}
그런 다음 데이터 모델 파일을 로드해야 합니다. 라고 가정하면 로딩 시간 에 ext-eprint.dbx
옵션을 전달합니다 .datamodel=ext-eprint
biblatex
다음을 통해 임의의 별칭을 추가할 수 있습니다.
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=pmid, fieldtarget=pubmed]
}
}
}
물론 이러한 전자 인쇄물에는 형식이 필요하며 일반적인 패턴은 매우 유사합니다.
\makeatletter
\DeclareFieldFormat{arxiv}{%
arXiv\addcolon\space
\ifhyperref
{\href{http://arxiv.org/\abx@arxivpath/#1}{%
\nolinkurl{#1}%
\iffieldundef{arxivclass}
{}
{\addspace\texttt{\mkbibbrackets{\thefield{arxivclass}}}}}}
{\nolinkurl{#1}
\iffieldundef{arxivclass}
{}
{\addspace\texttt{\mkbibbrackets{\thefield{arxivclass}}}}}}
\makeatother
\DeclareFieldFormat{pmcid}{%
PMCID\addcolon\space
\ifhyperref
{\href{http://www.ncbi.nlm.nih.gov/pmc/articles/#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\DeclareFieldFormat{mr}{%
MR\addcolon\space
\ifhyperref
{\href{http://www.ams.org/mathscinet-getitem?mr=MR#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\DeclareFieldFormat{zbl}{%
Zbl\addcolon\space
\ifhyperref
{\href{http://zbmath.org/?q=an:#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\DeclareFieldAlias{jstor}{eprint:jstor}
\DeclareFieldAlias{hdl}{eprint:hdl}
\DeclareFieldAlias{pubmed}{eprint:pubmed}
\DeclareFieldAlias{googlebooks}{eprint:googlebooks}
biblatex
eprint
eprint 정보를 인쇄하기 위해 bibmacro를 사용하므로 거기에 새로운 유형을 추가하기만 하면 됩니다.
\renewbibmacro*{eprint}{%
\printfield{arxiv}%
\newunit\newblock
\printfield{jstor}%
\newunit\newblock
\printfield{mr}%
\newunit\newblock
\printfield{zbl}%
\newunit\newblock
\printfield{hdl}%
\newunit\newblock
\printfield{pubmed}%
\newunit\newblock
\printfield{pmcid}%
\newunit\newblock
\printfield{googlebooks}%
\newunit\newblock
\iffieldundef{eprinttype}
{\printfield{eprint}}
{\printfield[eprint:\strfield{eprinttype}]{eprint}}}
MWE
\documentclass[a4paper,12pt]{article}%
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\begin{filecontents*}{ext-eprint.dbx}
\ProvidesFile{ext-eprint.dbx}[2016/09/11 extended stand-alone eprint fields]
\DeclareDatamodelFields[type=field,datatype=verbatim]{arxiv,mr,zbl,jstor,hdl,pubmed,googlebooks,pmcid}
\DeclareDatamodelEntryfields{arxiv,mr,zbl,jstor,hdl,pubmed,googlebooks,pmcid}
\DeclareDatamodelFields[type=field,datatype=literal]{arxivclass}
\DeclareDatamodelEntryfields{arxivclass}
\end{filecontents*}
\begin{filecontents*}{\jobname.bib}
@article{ContEp,
author = {Mark G. Frei and Hitten P. Zaveri and Susan Arthurs and Gregory K. Bergey and Christophe Jouny and Klaus Lehnertz and Jean Gotman and Ivan Osorio and Theoden I. Netoff and Walter J. Freeman and John Jefferys and Gregory Worrell and Michel Le Van Quyen and Steven J. Schiff and Florian Mormannn},
title = {Controversies in epilepsy},
subtitle = {Debates held during the Fourth International Workshop on Seizure Prediction},
journaltitle = {Epilepsy \& Behavior},
volume = {19},
number = {1},
pages = {4-16},
date = {2010-09},
doi = {10.1016/j.yebeh.2010.06.009},
pmcid = {PMC2943379},
pmid = {20708976},
}
@article{frege,
author = {Gottlob Frege},
title = {The Thought},
subtitle = {A Logical Inquiry},
journaltitle = {Mind},
series = {newseries},
volume = {65},
number = {259},
jstor = {2251513},
date = {1956-07},
pages = {289-311},
}
@online{hawking,
author = {S. W. Hawking},
title = {Information Preservation and Weather Forecasting for Black Holes},
arxiv = {1401.5761},
arxivclass = {hep-th},
date = {2014-01-22},
}
@online{albar,
author = {B. Albar and D. Gon{\c c}alves},
title = {On triangles in $K_r$-minor free graphs},
arxiv = {1304.5468},
year = 2013,
}
@article{kawa,
author = {Ken-ichi Kawarabayashi and Zi-Xia Song},
title = {Independence number and clique minors},
journal = {J. Graph Theory},
volume = 56,
number = 3,
pages = {219-226},
year = 2007,
doi = {10.1002/jgt.20268},
mr = {2355127},
}
@article{kostochka,
author = {A. V. Kostochka},
title = {On the minimum of the Hadwiger number for graphs with given mean degree of vertices},
journal = {Metody Diskretn. Anal.},
volume = {38},
pages = {37--58},
year = {1982},
mr = {0713722},
zbl = {0544.05037},
}
\end{filecontents*}
\usepackage[backend=biber, style=authoryear-icomp, dashed=true, datamodel=ext-eprint]{biblatex}
\usepackage{hyperref}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=pmid, fieldtarget=pubmed]
}
}
}
\makeatletter
\DeclareFieldFormat{arxiv}{%
arXiv\addcolon\space
\ifhyperref
{\href{http://arxiv.org/\abx@arxivpath/#1}{%
\nolinkurl{#1}%
\iffieldundef{arxivclass}
{}
{\addspace\texttt{\mkbibbrackets{\thefield{arxivclass}}}}}}
{\nolinkurl{#1}
\iffieldundef{arxivclass}
{}
{\addspace\texttt{\mkbibbrackets{\thefield{arxivclass}}}}}}
\makeatother
\DeclareFieldFormat{pmcid}{%
PMCID\addcolon\space
\ifhyperref
{\href{http://www.ncbi.nlm.nih.gov/pmc/articles/#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\DeclareFieldFormat{mr}{%
MR\addcolon\space
\ifhyperref
{\href{http://www.ams.org/mathscinet-getitem?mr=MR#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\DeclareFieldFormat{zbl}{%
Zbl\addcolon\space
\ifhyperref
{\href{http://zbmath.org/?q=an:#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\DeclareFieldAlias{jstor}{eprint:jstor}
\DeclareFieldAlias{hdl}{eprint:hdl}
\DeclareFieldAlias{pubmed}{eprint:pubmed}
\DeclareFieldAlias{googlebooks}{eprint:googlebooks}
\renewbibmacro*{eprint}{%
\printfield{arxiv}%
\newunit\newblock
\printfield{jstor}%
\newunit\newblock
\printfield{mr}%
\newunit\newblock
\printfield{zbl}%
\newunit\newblock
\printfield{hdl}%
\newunit\newblock
\printfield{pubmed}%
\newunit\newblock
\printfield{pmcid}%
\newunit\newblock
\printfield{googlebooks}%
\newunit\newblock
\iffieldundef{eprinttype}
{\printfield{eprint}}
{\printfield[eprint:\strfield{eprinttype}]{eprint}}}
\begin{document}
\nocite{baez/online,wassenberg,hawking,albar,kawa,kostochka,frege,ContEp}
\printbibliography
\end{document}
* 문서 버전 2.9부터 biblatex
에서는 로드 \DeclareDatamodelFields
하고\DeclareDatamodelEntryfields
하지만 문서 자체에서도 작동합니다. §4.5.3 참조데이터 모델 사양~의biblatex
선적 서류 비치.\DeclareDatamodel...
명령은 외부화되어야 합니다..dbx
. 보다데이터 모델 매크로는 프리앰블에서 사용할 수 없습니다..
답변2
이러한 종류의 사용자 정의 형식 변경은 최근 개발된 Bibulous 프로젝트(http://nzhagen.github.io/bibulous/). OP의 예에는 데이터베이스 파일이 있습니다.
@arxiv{one,
author = {B. Albar and D. Gon{\c c}alves},
title = "{On triangles in K\_r-minor free graphs}",
eprint = {1304.5468},
year = 2013
}
@article{two,
author = {Ken-ichi Kawarabayashi and Zi-Xia Song},
title = {Independence number and clique minors},
journal = {J. Graph Theory},
volume = 56,
number = 3,
pages = {219-226},
year = 2007,
doi = {10.1002/jgt.20268},
mr = {2355127}
}
@article{three,
author = {A. V. Kostochka},
title = {On the minimum of the Hadwiger number for graphs with given mean degree of vertices},
journal = {Metody Diskretn. Anal.},
volume = {38},
pages = {37--58},
year = {1982},
mr = {0713722},
zbl = {0544.05037}
}
이러한 데이터베이스 항목의 경우 다음과 같이 zbl
, mr
, doi
및 필드를 사용하는 사용자 정의 템플릿을 생성할 수 있습니다 .eprint
TEMPLATES:
arxiv = <au>. <title>. <year>. arXiv: \href{http://arxiv.org/abs/<eprint>}{<eprint>}.
article = <au>. <title>. <journal>, <volume>[(<number>)]:[<startpage>--<endpage>|<startpage>|<eid>|], <year>.[ doi: \href{http://dx.doi.org/<doi>}{<doi>}.][ MR: \href{http://www.ams.org/mathscinet-getitem?mr=MR<mr>}{<mr>}.][ Zbl: \href{http://zbmath.org/?q=an:<zbl>}{<zbl>}.]
위의 코드 조각은 실제로 완전한 스타일 템플릿 파일입니다. 다음 LaTeX 기본 파일 사용
\documentclass{article}
\usepackage[colorlinks=True,urlcolor=blue,citecolor=blue,breaklinks=true]{hyperref}
\begin{document}
\nocite{one,two,three}
\bibliographystyle{mybst}
\bibliography{mybib}
\end{document}
OP가 요청한 형식화된 참조 목록을 얻습니다.