
私は歴史の授業で紹介されている作品を参照するためにbiblatexとbiberを使用しています。世紀単位のデータ(12世紀または12世紀フランス語の日付は非常に一般的です。私は以前、このような日付を「年」フィールドに入力していましたが、前回のアップグレード以降は機能していました。
MWE は TexLive 2015 でコンパイルされます…
\documentclass{article}
\usepackage{biblatex}
\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Thesis{exemple_image,
Title = {Title of the work},
Author = {Artist Name},
Location = {Switzerland},
Year = {{\siecle{15}}},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\newcommand{\siecle}[1]{%
\textsc{\romannumeral #1}\textsuperscript{e}~siècle
}
\nocite{*}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
…しかし、TexLive 2016 ではエラーが発生します: ! Use of /sortlist doesn't match its definition
。
Biblatex 3.5 では、「Year」フィールドの制限が緩いようです。ドキュメントを検索しましたが、見つかりません。あらゆる提案をお待ちしています。
答え1
3.10以降の新しいISO 8601日付機能では、biblatex
世紀を次のように入力できます。
date = {19XX}
残念ながら、標準の日付形式では、これを「20世紀」などの出力でそのまま処理することはできず、「1900-1999」とだけ表示されますが、次のように世紀の処理を有効にすることができます。
\documentclass[french]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@thesis{exemple_image,
title = {Title of the work},
author = {Artist Name},
location = {Switzerland},
date = {16XX},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\NewBibliographyString{century}
\DefineBibliographyStrings{french}{century = {siècle}}
\makeatletter
\renewcommand*{\RNfont}{\textsc}
\DeclareFieldFormat{datecentury}{\RN{#1}\textsuperscript{e}}
\renewrobustcmd*{\mkdaterangetrunc}[2]{%
\begingroup
\blx@metadateinfo{#2}%
\iffieldundef{#2year}
{}
{\printtext[#2date]{%
\datecircaprint
% Such a season component can only come from an EDTF 5.1.5 season which replaces
% a normal month so if it exists, we know that a normal date print is ruled out
\iffieldequalstr{dateunspecified}{yearincentury}
{\printtext[datecentury]{\number\numexpr\thefield{#2year}/100+1\relax}\setunit{\addnbspace}\bibstring{century}}
{\iffieldundef{#2season}
{\iffieldsequal{#2year}{#2endyear}
{\iffieldsequal{#2month}{#2endmonth}
{\csuse{mkbibdate#1}{}{}{#2day}}
{\csuse{mkbibdate#1}{}{#2month}{#2day}}}
{\csuse{mkbibdate#1}{#2year}{#2month}{#2day}%
\iffieldsequal{#2dateera}{#2enddateera}{}
{\dateeraprint{#2year}}}}
{\iffieldsequal{#2year}{#2endyear}
{\csuse{mkbibseasondate#1}{}{#2season}}
{\csuse{mkbibseasondate#1}{#2year}{#2season}%
\iffieldsequal{#2dateera}{#2enddateera}{}
{\dateeraprint{#2year}}}}%
\dateuncertainprint
\iffieldundef{#2endyear}
{}
{\iffieldequalstr{#2endyear}{}
{\mbox{\bibdaterangesep}}
{\bibdaterangesep
\enddatecircaprint
\iffieldundef{#2season}
{\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}
{\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}%
\enddateuncertainprint
\dateeraprint{#2endyear}}}}}}%
\endgroup}
\makeatother
\begin{document}
\nocite{*}
\printbibliography
\end{document}
世紀をチェックする場合\iffieldequalstr{dateunspecified}{yearincentury}
、フォーマットはdatecentury
世紀の出力を制御し、bibstring をcentury
使用して出力をさらにローカライズできます。
以下も参照96-dates.tex
§2.3.8と同様日付と時刻の仕様、§4.2.4.1汎用フィールドのドキュメントbiblatex
。
答え2
答え3
もう 1 つの方法は、Biber を使用してフィールドを別のフィールドにマップすることですyear
。(この例では を使用しますaddendum
。) この例では、ソース マッピングをエントリの特定のサブセットに制限する必要があるかどうかは不明ですが、これを行う方法はいくつかあります。(この例では、例として、特定の.bib
ファイルとエントリ タイプに制限しています。)thesis
Biber は警告やエラーなしで終了します。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Thesis{exemple_image,
Title = {Title of the work},
Author = {Artist Name},
Location = {Switzerland},
Year = {{\siecle{15}}},
}
\end{filecontents}
\usepackage[backend=biber]{biblatex}
\addbibresource{\jobname.bib}
\newcommand{\siecle}[1]{%
\textsc{\romannumeral #1}\textsuperscript{e}~siècle
}
\DeclareSourcemap{
\maps[datatype=bibtex, overwrite]{
\map{
\perdatasource{\jobname.bib}% <-- If you have them in a special bib file
\pertype{thesis}% <-- If you want to limit by type
\step[fieldsource=year]
\step[fieldset=addendum, origfieldval]
\step[fieldset=year, null]
}
}
}
\nocite{*}
\begin{document}
\nocite{*}
\printbibliography
\end{document}