
Мне интересно, есть ли эффективный способ указать и автора, и год, похожий на тот, что вы получаете с biblatex
's, \textcite
то есть Автор (год), при использовании biblatex-mla
. Сейчас я использую довольно неэффективный метод:
\begin{filecontents*}{test.bib}
title = {{Seinte Katerine}},
editor = {S.R.T.O. d'Ardenne and E.J. Dobson},
year = {1981},
publisher = {Oxford University Press},
address = {Oxford}
\end{filecontents*}
\documentclass{article}
\usepackage[style=mla,backend=bibtex8]{biblatex}
\bibliography{test}
\begin{document}
According to \citeauthor{katherine} (\citeyear{katherine})...
\end{document}
Если кто-то знает, как это сделать более эффективно, буду очень признателен за предложения.
решение1
Беглый взгляд на biblatex-mla
документацию показывает, что такой тип ссылки «автор-год» не является стандартным.цитатакомандование в соответствии с руководящими принципами MLA, поэтому я предполагаю, что именно поэтому такое командование не предусмотрено.
Вы можете создать свою собственную команду с помощью:
\newcommand\citeauthyear[1]{\citeauthor{#1} (\citeyear{#1})}
У этого есть по крайней мере один недостаток: по умолчанию это не будет работать с hyperref
-- что может быть не так уж и важно. Это также не будет "отслеживаться" трекером MLA ibid -- я не уверен, хорошо это или плохо. Вам нужно решить, что должен делать вывод этой последовательности:
\citeauthyear{<key1>} wrote about this \autocite{<key1>}
Я думаю, это зависит от того, как вы используете эту команду. Мои смутные воспоминания о правилах MLA (со времен моего бакалавриата много лет назад) говорят о том, что MLA ожидает, что вы «заключите» свою цитату в скобки, например: name ... <ideas from "name"> ... (page)
. Если так, то отслеживание, вероятно, хорошая вещь.
Так что еще одно решение — создать свою собственную более ортодоксальную команду через \DeclareCiteCommand
. Вот довольно простая:
\DeclareCiteCommand{\aycite}
{\usebibmacro{prenote}}%
{\usebibmacro{citeindex}%
\usebibmacro{cite:mla:authyear}}%
{}%
{\usebibmacro{postnote}\citereset}
\newbibmacro*{cite:mla:authyear}%
{\printtext[bibhyperref]{%
\printnames{labelname}\space
\printtext[parens]{\printdate}}}
Здесь по умолчанию hyperref
будет работать, и команда не отслеживается. Вы можете изменить отслеживание, удалив \citereset
в \aycite
определении.
Вот полный пример:
\begin{filecontents*}{\jobname.bib}
@book{katherine,
title = {{Seinte Katerine}},
editor = {S.R.T.O. d'Ardenne and E.J. Dobson},
year = {1981},
publisher = {Oxford University Press},
address = {Oxford}
}
\end{filecontents*}
\documentclass{article}
\usepackage[style=mla,backend=bibtex8]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{xcolor}
\usepackage[colorlinks, allcolors=red]{hyperref}
\DeclareCiteCommand{\aycite}
{\usebibmacro{prenote}}%
{\usebibmacro{citeindex}%
\usebibmacro{cite:mla:authyear}}%
{}%
{\usebibmacro{postnote}\citereset}
\newbibmacro*{cite:mla:authyear}%
{\printtext[bibhyperref]{%
\printnames{labelname}\space
\printtext[parens]{\printdate}}}
% This version does not get "tracked" by `biblatex-mla`
\newcommand\citeauthyear[1]{\citeauthor{#1} (\citeyear{#1})}
\begin{document}
\parindent0pt
% Baseline citation
\autocite[100]{katherine} \citereset
% These two paragraphs are equivalent
According to \citeauthor{katherine} (\citeyear{katherine}); \ldots
\autocite[100]{katherine} \citereset
According to \citeauthyear{katherine}; \ldots
\autocite[100]{katherine} \citereset
% These two commands paragraphs produce identical results; if you'd
% rather get the \aycite command tracked, take out the \citereset
% commands in the \aycite definition
According to \aycite{katherine}; \ldots
\autocite[100]{katherine}
\citereset
According to \aycite{katherine}; \ldots
\citereset% <-- this is the difference between this paragraph and the one above
\autocite[100]{katherine}
\printbibliography
\end{document}