![표준을 인라인으로 인용하기 위해 \textcite를 사용하려면 어떤 수정을 수행해야 합니까?](https://rvso.com/image/370327/%ED%91%9C%EC%A4%80%EC%9D%84%20%EC%9D%B8%EB%9D%BC%EC%9D%B8%EC%9C%BC%EB%A1%9C%20%EC%9D%B8%EC%9A%A9%ED%95%98%EA%B8%B0%20%EC%9C%84%ED%95%B4%20%5Ctextcite%EB%A5%BC%20%EC%82%AC%EC%9A%A9%ED%95%98%EB%A0%A4%EB%A9%B4%20%EC%96%B4%EB%96%A4%20%EC%88%98%EC%A0%95%EC%9D%84%20%EC%88%98%ED%96%89%ED%95%B4%EC%95%BC%20%ED%95%A9%EB%8B%88%EA%B9%8C%3F.png)
내 문서 텍스트에 표준을 인용하려고 합니다. 이 주제에 관해서BibLaTeX에서 표준(ISO 등)을 인용하는 방법은 무엇입니까?내 요구에 맞는 labelalpha 및 참고문헌 항목을 생성했지만 textcite 명령을 수정하지 못했습니다.
MWE는 다음과 같습니다.
\documentclass{article}
\begin{filecontents}{Biblio.bib}
@standard{ASI1234_1,
year = {1999},
title = {somethings special in the world, that has to be defined},
urldate = {2012-09-10},
number = {1234-1},
date = {1999-04},
type = {ASI},
version = {1999-04},
organization = {{ASI}}
}
\end{filecontents}
%%Definition einer Normenklasse für Biblatex
\begin{filecontents}{standards.dbx}
%Modifikation für Normen in Biblatex
\DeclareDatamodelEntryfields[standard]{number,type}
\end{filecontents}
%Pakete für das Literaturverzeichnis mit BibLatex und Einstellung
\usepackage[
style=alphabetic,
% style=draft,
backend=biber,
datamodel=standards]{biblatex}
\addbibresource{Biblio.bib}
\DefineBibliographyStrings{ngerman}{andothers={et\addabbrvspace al\adddot}} %et al. statt u.a.
%\DefineBibliographyStrings{ngerman}{and={\&}} % und zu & machen
\renewcommand*{\labelalphaothers}{} %Zeichen für mehrere Authoren in Abkürzung löschen
%Label für Standard
\DeclareLabelalphaTemplate[standard]{
\labelelement{ %
\field{type} %
} %
\labelelement{ %
\field{number} %
} %
\labelelement{ %
\literal{:} %
} %
\labelelement{ %
\field{year} %
} %
} %
%Eintrag Bibliographie
\DeclareBibliographyDriver{standard}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\printfield{type}%
\setunit{\addspace}\newblock%
\printfield{number}%
\setunit{\addcolon}\newblock%
\printfield{year}%
\iffieldundef{month}{%
\setunit{\addspace}\newblock}%
{\setunit{\addperiod}}%
\printfield{month} %
\setunit*{\addspace}\newblock %
\usebibmacro{title}%
\usebibmacro{finentry}}
\begin{document}
Blablablabba \textcite[10-12]{ASI1234_1} Balbabab
\printbibliography
\end{document}
Entrytype 표준에 대해서만 textcite 명령을 수정하고 싶습니다. 나는 textcite 명령이 먼저 labelname 필드를 확인하고 비어 있으면 labeltitle 필드를 사용한다는 것을 알아냈습니다. 이것이 textcite 명령을 사용하여 전체 제목이 인쇄되는 이유입니다. labeltitle 필드는 특정 순서로 두 개의 제목 필드를 분석합니다. .bib 파일 내에서 짧은 제목을 정의하는 표준이 많기 때문에 좋은 선택이 아닙니다. textcite 명령이 전체 제목 대신 이를 사용하도록 사용자 정의 짧은 제목을 즉석에서 생성할 수 있습니까?
결과는 다음과 같아야 합니다: ASI 1234 [ASI1234:1999, S. 10-12]
답변1
다음과 같은 직업인 것 같습니다 \DeclareSourcemap
.
\documentclass{article}
\begin{filecontents}{Biblio.bib}
@standard{ASI1234_1,
year = {1999},
title = {somethings special in the world, that has to be defined},
urldate = {2012-09-10},
number = {1234-1},
date = {1999-04},
type = {ASI},
version = {1999-04},
organization = {{ASI}}
}
\end{filecontents}
%%Definition einer Normenklasse für Biblatex
\begin{filecontents}{standards.dbx}
%Modifikation für Normen in Biblatex
\DeclareDatamodelEntryfields[standard]{number,type}
\end{filecontents}
%Pakete für das Literaturverzeichnis mit BibLatex und Einstellung
\usepackage[
style=alphabetic,
% style=draft,
backend=biber,
datamodel=standards]{biblatex}
\addbibresource{Biblio.bib}
\DefineBibliographyStrings{ngerman}{andothers={et\addabbrvspace al\adddot}} %et al. statt u.a.
%\DefineBibliographyStrings{ngerman}{and={\&}} % und zu & machen
\renewcommand*{\labelalphaothers}{} %Zeichen für mehrere Authoren in Abkürzung löschen
%Label für Standard
\DeclareLabelalphaTemplate[standard]{
\labelelement{ %
\field{type} %
} %
\labelelement{ %
\field{number} %
} %
\labelelement{ %
\literal{:} %
} %
\labelelement{ %
\field{year} %
} %
} %
%Eintrag Bibliographie
\DeclareBibliographyDriver{standard}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\printfield{type}%
\setunit{\addspace}\newblock%
\printfield{number}%
\setunit{\addcolon}\newblock%
\printfield{year}%
\iffieldundef{month}{%
\setunit{\addspace}\newblock}%
{\setunit{\addperiod}}%
\printfield{month} %
\setunit*{\addspace}\newblock %
\usebibmacro{title}%
\usebibmacro{finentry}}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map[overwrite]{
\pertype{standard}
\step[fieldsource=type, fieldset=shorttitle, origfieldval]
\step[fieldset=shorttitle,fieldvalue={\addspace}, append]
\step[fieldsource=number, fieldset=shorttitle, origfieldval, append]
}
}
}
\begin{document}
Blablablabba \textcite[10-12]{ASI1234_1} Balbabab
\printbibliography
\end{document}
답변2
진정한 즉석 솔루션을 찾고 있다면 다음을 정의하십시오.
\makeatletter
\newcommand*{\redeflabeltitle}[1]{\AtNextCitekey{\csdef{abx@field@labeltitle}{#1}}}
\makeatother
서문에 다음과 같이 사용하십시오.
\redeflabeltitle{Eine tolle Norm}\textcite{ASI1234_1}
문서에서.
shorttitle
하지만 실제로는 파일에 를 제공하는 것이 훨씬 더 깔끔하므로 .bib
모든 것이 실제로 일관됩니다.
답변3
빠른 해킹:
\documentclass{article}
\begin{filecontents}{Biblio.bib}
@standard{ASI1234_1,
year = {1999},
title = {somethings special in the world, that has to be defined},
urldate = {2012-09-10},
number = {1234-1},
date = {1999-04},
type = {ASI},
version = {1999-04},
organization = {{ASI}}
}
\end{filecontents}
%%Definition einer Normenklasse für Biblatex
\begin{filecontents}{standards.dbx}
%Modifikation für Normen in Biblatex
\DeclareDatamodelEntryfields[standard]{number,type}
\end{filecontents}
%Pakete für das Literaturverzeichnis mit BibLatex und Einstellung
\usepackage[
style=alphabetic,
% style=draft,
backend=biber,
datamodel=standards]{biblatex}
\addbibresource{Biblio.bib}
\DefineBibliographyStrings{ngerman}{andothers={et\addabbrvspace al\adddot}} %et al. statt u.a.
%\DefineBibliographyStrings{ngerman}{and={\&}} % und zu & machen
\renewcommand*{\labelalphaothers}{} %Zeichen für mehrere Authoren in Abkürzung löschen
%Label für Standard
\DeclareLabelalphaTemplate[standard]{
\labelelement{ %
\field{type} %
} %
\labelelement{ %
\field{number} %
} %
\labelelement{ %
\literal{:} %
} %
\labelelement{ %
\field{year} %
} %
} %
%Eintrag Bibliographie
\DeclareBibliographyDriver{standard}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\printfield{type}%
\setunit{\addspace}\newblock%
\printfield{number}%
\setunit{\addcolon}\newblock%
\printfield{year}%
\iffieldundef{month}{%
\setunit{\addspace}\newblock}%
{\setunit{\addperiod}}%
\printfield{month} %
\setunit*{\addspace}\newblock %
\usebibmacro{title}%
\usebibmacro{finentry}}
\makeatletter
\renewbibmacro*{textcite}{%
\iffieldequals{namehash}{\cbx@lasthash}
{\setunit{\multicitedelim}}
{\ifentrytype{standard}{}{\ifnameundef{labelname}
{\printfield[citetitle]{labeltitle}}
{\printnames{labelname}}%
\setunit{%
\global\booltrue{cbx:parens}%
\printdelim{namelabeldelim}\bibopenbracket}%
\stepcounter{textcitecount}%
\savefield{namehash}{\cbx@lasthash}}}%
\ifnumequal{\value{citecount}}{1}
{\usebibmacro{prenote}}
{}%
\ifentrytype{standard}{\printfield{type}\printfield{number}}{\usebibmacro{cite}}%
\setunit{%
\ifbool{cbx:parens}
{\bibclosebracket\global\boolfalse{cbx:parens}}
{}%
\textcitedelim}}
\makeatother
\begin{document}
Blablablabba \textcite{ASI1234_1} Balbabab
\printbibliography
\end{document}