
~ 안에biblatex에서 \citejournal, \citebooktitle, \cite… 명령을 만드는 방법은 무엇입니까?Gonzalo Medina와 Audrey는 \citeauthor{}
예를 들어 문서에 넣으면 책이나 저널의 제목만 생성되는 것처럼 작동하는 코드를 제공했습니다. 이 문제는 명령에서도 발생합니다 \citeauthor
.
~ 안에자동적 인Vgl.& 자동 견적 들여쓰기(인용 길이에 따라 다름)lockstep은 lockstep과 Martin Scharrer의 이전 기여를 기반으로 인용 명령을 생성합니다.
출력에서 특정 줄 수(바람직하게는 3개)를 초과할 때마다 들여쓰기되어 조판됩니다.
인용은 "Vgl" 없이 자동으로 조판됩니다. -- 짧은 형식이든 긴 형식이든 상관없습니다.
출력이 의역 또는 요약인 경우(즉, 출력에 인용이 없는 경우) 전주 "Vgl"로 조판됩니다.
Biblatex에서 작동합니다.
주요 목적은 두 가지를 모두 자동화하는 것입니다.vgl.(engl. 비교) 및 줄 들여쓰기.
문제:불행하게도 두 코드를 결합하면 프리노트가vgl.출력에서 각 등의 명령 \citeauthor
앞에 옵니다 . \citetitle
당신은 얻을 것이다vgl. 작가대신에작가. 이 문제를 전 세계적으로 해결할 수 있는 사람이 있나요?
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[style=authoryear,autocite=footnote,backend=bibtex]{biblatex} % Here, Philip added "autocite=footnote,backend=bibtex"
%-------------------
\NewBibliographyString{compare}
\DefineBibliographyStrings{ngerman}{%
compare = {vgl\adddot},
}
\newbool{withintextquote}
\renewbibmacro*{multiprenote}{%
\renewbibmacro*{prenote}{%
\iffieldundef{prenote}
{}
{\printfield{prenote}%
\setunit{\prenotedelim}}}%
\iffieldundef{multiprenote}{%
\ifbool{withintextquote}{%
}{%
\bibstring{compare}\addspace
}%
}
{\printfield{multiprenote}%
\setunit{\prenotedelim}}}
\renewbibmacro*{prenote}{%
\iffieldundef{prenote}{%
\ifbool{withintextquote}{%
}{%
\bibstring{compare}\addspace
}%
}
{\printfield{prenote}%
\setunit{\prenotedelim}}}
\makeatletter
\newcommand{\cquotation}[1]{%
\begingroup
\booltrue{withintextquote}%
% \settowidth doesn't like paragraphs
\setbox\@tempboxa\hbox{%
\def\par{\hspace{3\linewidth}}% If a paragraph is included force long form
%\let\par\space % Ignore paragraphs
\let\footnote\@empty% make sure autocite does not do anything here; this is new
\let\autocite\@empty
#1}%
\ifdim\wd\@tempboxa>3\linewidth
\begin{quote}
\itshape
#1
\end{quote}
\else
{\itshape #1}%
\fi
\endgroup}
\makeatother
%-------------------
\DeclareCiteCommand{\citejournal}
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{journal}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\citebooktitle}
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{booktitle}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\citeintitle}% Based on \citetitle from biblatex.def
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
{\ifciteindex
{\indexfield{indextitle}}
{}%
\iffieldundef{journaltitle}
{\iffieldundef{booktitle}
{\iffieldundef{maintitle}
{\printfield[citetitle]{labeltitle}}% Behave like \citetitle if no "main" title
{\printtext[maintitle]{\printfield[titlecase]{maintitle}}}}
{\printtext[booktitle]{\printfield[titlecase]{booktitle}}}}
{\printtext[journaltitle]{\printfield[titlecase]{journaltitle}}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{yoon,
author = {Yoon, Myeong S. and Ryu, Dowook and Kim, Jeongryul and Ahn, Kyo Han},
title = {Palladium pincer complexes with reduced bond angle strain: efficient catalysts
for the Heck reaction},
journaltitle = {Organometallics},
volume = {25},
number = {10},
date = {2006},
pages = {2409--2411}}
@InProceedings{salam,
author = {Salam, Abdus},
editor = {Svartholm, Nils},
title = {Weak and Electromagnetic Interactions},
booktitle = {Elementary Particle Theory},
booksubtitle = {Relativistic Groups and Analyticity},
booktitleaddon = {Proceedings of the Eighth Nobel Symposium},
eventdate = {1968-05-19/1968-05-25},
venue = {Aspen{\"a}sgarden, Lerum},
publisher = {Almquist \& Wiksell},
location = {Stockholm},
date = {1968},
pages = {367--377}}
@InProceedings{moraux,
author = {Moraux, Paul},
editor = {Lloyd, G. E. R. and Owen, G. E. L.},
title = {Le \emph{De Anima} dans la tradition gr{\`e}cque},
subtitle = {Quelques aspects de l'interpretation du trait{\'e}, de Theophraste {\`a}
Themistius},
shorttitle = {\emph{De Anima} dans la tradition gr{\`e}cque},
booktitle = {Aristotle on Mind and the Senses},
booktitleaddon = {Proceedings of the Seventh Symposium Aristotelicum},
eventdate = {1975},
publisher = cup,
location = {Cambridge},
date = {1979},
pages = {281--324}}
@InCollection{pines,
author = {Pines, Shlomo},
editor = {Twersky, Isadore},
indextitle = {Limitations of Human Knowledge According to Al-Farabi, ibn Bajja, and
Maimonides, The},
title = {The Limitations of Human Knowledge According to Al-Farabi, ibn Bajja, and
Maimonides},
shorttitle = {Limitations of Human Knowledge},
booktitle = {Studies in Medieval Jewish History and Literature},
publisher = hup,
location = {Cambridge, Mass.},
date = {1979},
pages = {82--109}}
\end{filecontents}
\begin{document}
This is a paraphrase \autocites{yoon}{yoon} % Added by Philip
This is a paraphrase \autocites{yoon}{yoon} % Added by Philip
\cquotation{This is a short direct quotation. \autocite{yoon}}
\cquotation{This is a long direct quotation. This is a long direct
quotation. This is a long direct quotation. This is a long direct
quotation. This is a long direct quotation. This is a long direct
quotation. This is a long direct quotation. This is a long direct
quotation.\autocite{yoon}}
This is a paraphrase \autocite{yoon}
This is a paraphrase with prenote \autocite[siehe hierzu auch][]{yoon}
This is a paraphrase \autocite{yoon}
This is a paraphrase \autocite{yoon}
This is a paraphrase \autocites{yoon}{yoon} % Added by Philip
This is a paraphrase \autocites{yoon}{yoon} % Added by Philip
\cquotation{This is a short direct quotation. \autocite{yoon}}
This is a paraphrase \autocite{yoon}
\noindent
\citeintitle{yoon} versus \citejournal{yoon} \\\\
\citeintitle{salam} versus \citebooktitle{salam} \\\\
\citeintitle{moraux} versus \citebooktitle{moraux} \\\\
\citeintitle{pines} versus \citebooktitle{pines}
\printbibliography
\end{document}
참고 1:vgl.여기에 사용된 코드는 lockstep 버전을 기반으로 moewe에 의해 약간 개선되었습니다. 이상한 번호 매기기와 원치 않는 프리노트 출력을 방지합니다.vgl.biblatex 설정 에서 autocite=footnote
(링크Biblatex: 문제vgl.동적 인용 명령의 번호 매기기).
참고 2: 이 \citeauthor{}
문제는 명령을 \citeauthor[\unspace][]{}
. 이는 가독성에 영향을 미치므로 전역 솔루션이 선호됩니다. 그러나 아마도 이를 기반으로 글로벌 솔루션이 구축될 수도 있습니다.
답변1
\newbibmacro*{simp:prenote}
"vgl"/비교 항목을 인쇄하지 않는 새 항목을 정의할 수 있습니다.
\newbibmacro*{simp:prenote}{%
\iffieldundef{prenote}
{}
{\printfield{prenote}%
\setunit{\prenotedelim}}}
bibmacro{prenote}
(이것은 우연히 in 의 표준 정의입니다 biblatex.def
.)
그런 다음 모든 \citetitle
/ \citeauthor
및 친구 매크로 에서 이 간단한 bib 매크로를 사용합니다.
사용할 표준 \citeauthor
/ 매크로를 재정의해야 합니다.\citetitle
simp:prenote
\DeclareCiteCommand{\citeauthor}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\ifciteindex
{\indexnames{labelname}}
{}%
\printnames{labelname}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand*{\citeauthor}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\ifciteindex
{\indexnames{labelname}}
{}%
\printnames[][1-1]{labelname}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\citetitle}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\ifciteindex
{\indexfield{indextitle}}
{}%
\printfield[citetitle]{labeltitle}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand*{\citetitle}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\ifciteindex
{\indexfield{indextitle}}
{}%
\printfield[citetitle]{title}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\citeyear}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\printfield{year}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand*{\citeyear}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\printfield{year}\printfield{extrayear}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\citedate}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\printdate}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand*{\citedate}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\printdateextra}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\citeurl}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\printfield[citeurl]{url}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\notecite}
{\printfield{simp:prenote}%
\setunit*{\prenotedelim}}
{\nocite{\thefield{entrykey}}}
{}
{\printfield{postnote}}
\DeclareCiteCommand{\citejournal}
{\usebibmacro{simp:prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{journal}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\citebooktitle}
{\usebibmacro{simp:prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{booktitle}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\citeintitle}% Based on \citetitle from biblatex.def
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\ifciteindex
{\indexfield{indextitle}}
{}%
\iffieldundef{journaltitle}
{\iffieldundef{booktitle}
{\iffieldundef{maintitle}
{\printfield[citetitle]{labeltitle}}% Behave like \citetitle if no "main" title
{\printtext[maintitle]{\printfield[titlecase]{maintitle}}}}
{\printtext[booktitle]{\printfield[titlecase]{booktitle}}}}
{\printtext[journaltitle]{\printfield[titlecase]{journaltitle}}}}
{\multicitedelim}
{\usebibmacro{postnote}}
코드가 꽤 많지만 매우 간단합니다.
MWE
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[style=authoryear,autocite=footnote,backend=bibtex]{biblatex} % Here, Philip added "autocite=footnote,backend=bibtex"
%-------------------
\NewBibliographyString{compare}
\DefineBibliographyStrings{ngerman}{%
compare = {vgl\adddot},
}
\newbool{withintextquote}
\renewbibmacro*{multiprenote}{%
\renewbibmacro*{prenote}{%
\iffieldundef{prenote}
{}
{\printfield{prenote}%
\setunit{\prenotedelim}}}%
\iffieldundef{multiprenote}{%
\ifbool{withintextquote}{%
}{%
\bibstring{compare}\addspace
}%
}
{\printfield{multiprenote}%
\setunit{\prenotedelim}}}
\renewbibmacro*{prenote}{%
\iffieldundef{prenote}{%
\ifbool{withintextquote}{%
}{%
\bibstring{compare}\addspace
}%
}
{\printfield{prenote}%
\setunit{\prenotedelim}}}
\newbibmacro*{simp:prenote}{%
\iffieldundef{prenote}
{}
{\printfield{prenote}%
\setunit{\prenotedelim}}}
\makeatletter
\newcommand{\cquotation}[1]{%
\begingroup
\booltrue{withintextquote}%
% \settowidth doesn't like paragraphs
\setbox\@tempboxa\hbox{%
\def\par{\hspace{3\linewidth}}% If a paragraph is included force long form
%\let\par\space % Ignore paragraphs
\let\footnote\@empty% make sure autocite does not do anything here; this is new
\let\autocite\@empty
#1}%
\ifdim\wd\@tempboxa>3\linewidth
\begin{quote}
\itshape
#1
\end{quote}
\else
{\itshape #1}%
\fi
\endgroup}
\makeatother
%-------------------
\DeclareCiteCommand{\citeauthor}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\ifciteindex
{\indexnames{labelname}}
{}%
\printnames{labelname}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand*{\citeauthor}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\ifciteindex
{\indexnames{labelname}}
{}%
\printnames[][1-1]{labelname}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\citetitle}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\ifciteindex
{\indexfield{indextitle}}
{}%
\printfield[citetitle]{labeltitle}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand*{\citetitle}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\ifciteindex
{\indexfield{indextitle}}
{}%
\printfield[citetitle]{title}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\citeyear}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\printfield{year}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand*{\citeyear}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\printfield{year}\printfield{extrayear}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\citedate}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\printdate}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand*{\citedate}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\printdateextra}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\citeurl}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\printfield[citeurl]{url}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\notecite}
{\printfield{simp:prenote}%
\setunit*{\prenotedelim}}
{\nocite{\thefield{entrykey}}}
{}
{\printfield{postnote}}
\DeclareCiteCommand{\citejournal}
{\usebibmacro{simp:prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{journal}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\citebooktitle}
{\usebibmacro{simp:prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{booktitle}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\citeintitle}% Based on \citetitle from biblatex.def
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{simp:prenote}}
{\ifciteindex
{\indexfield{indextitle}}
{}%
\iffieldundef{journaltitle}
{\iffieldundef{booktitle}
{\iffieldundef{maintitle}
{\printfield[citetitle]{labeltitle}}% Behave like \citetitle if no "main" title
{\printtext[maintitle]{\printfield[titlecase]{maintitle}}}}
{\printtext[booktitle]{\printfield[titlecase]{booktitle}}}}
{\printtext[journaltitle]{\printfield[titlecase]{journaltitle}}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{yoon,
author = {Yoon, Myeong S. and Ryu, Dowook and Kim, Jeongryul and Ahn, Kyo Han},
title = {Palladium pincer complexes with reduced bond angle strain: efficient catalysts
for the Heck reaction},
journaltitle = {Organometallics},
volume = {25},
number = {10},
date = {2006},
pages = {2409--2411}}
@InProceedings{salam,
author = {Salam, Abdus},
editor = {Svartholm, Nils},
title = {Weak and Electromagnetic Interactions},
booktitle = {Elementary Particle Theory},
booksubtitle = {Relativistic Groups and Analyticity},
booktitleaddon = {Proceedings of the Eighth Nobel Symposium},
eventdate = {1968-05-19/1968-05-25},
venue = {Aspen{\"a}sgarden, Lerum},
publisher = {Almquist \& Wiksell},
location = {Stockholm},
date = {1968},
pages = {367--377}}
@InProceedings{moraux,
author = {Moraux, Paul},
editor = {Lloyd, G. E. R. and Owen, G. E. L.},
title = {Le \emph{De Anima} dans la tradition gr{\`e}cque},
subtitle = {Quelques aspects de l'interpretation du trait{\'e}, de Theophraste {\`a}
Themistius},
shorttitle = {\emph{De Anima} dans la tradition gr{\`e}cque},
booktitle = {Aristotle on Mind and the Senses},
booktitleaddon = {Proceedings of the Seventh Symposium Aristotelicum},
eventdate = {1975},
publisher = cup,
location = {Cambridge},
date = {1979},
pages = {281--324}}
@InCollection{pines,
author = {Pines, Shlomo},
editor = {Twersky, Isadore},
indextitle = {Limitations of Human Knowledge According to Al-Farabi, ibn Bajja, and
Maimonides, The},
title = {The Limitations of Human Knowledge According to Al-Farabi, ibn Bajja, and
Maimonides},
shorttitle = {Limitations of Human Knowledge},
booktitle = {Studies in Medieval Jewish History and Literature},
publisher = hup,
location = {Cambridge, Mass.},
date = {1979},
pages = {82--109}}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
This is a paraphrase \autocites{yoon}{yoon} % Added by Philip
This is a paraphrase \autocites{yoon}{yoon} % Added by Philip
\cquotation{This is a short direct quotation. \autocite{yoon}}
\cquotation{This is a long direct quotation. This is a long direct
quotation. This is a long direct quotation. This is a long direct
quotation. This is a long direct quotation. This is a long direct
quotation. This is a long direct quotation. This is a long direct
quotation.\autocite{yoon}}
This is a paraphrase \autocite{yoon}
This is a paraphrase with prenote \autocite[siehe hierzu auch][]{yoon}
This is a paraphrase \autocite{yoon}
This is a paraphrase \autocite{yoon}
This is a paraphrase \autocites{yoon}{yoon} % Added by Philip
This is a paraphrase \autocites{yoon}{yoon} % Added by Philip
\cquotation{This is a short direct quotation. \autocite{yoon}}
This is a paraphrase \autocite{yoon}
\noindent
\citeauthor{yoon} versus \citetitle{yoon} \\\\
\citeintitle{yoon} versus \citejournal{yoon} \\\\
\citeintitle{salam} versus \citebooktitle{salam} \\\\
\citeintitle{moraux} versus \citebooktitle{moraux} \\\\
\citeintitle{pines} versus \citebooktitle{pines}
\printbibliography
\end{document}