use crate::options::AndOptions;
use crate::{
tc_contributor, tc_date, tc_number, tc_title, tc_variable,
template::{
ContributorForm, ContributorRole, TemplateComponent, TemplateContributor, WrapPunctuation,
},
};
pub fn author_date_citation() -> Vec<TemplateComponent> {
vec![
TemplateComponent::Contributor(TemplateContributor {
contributor: ContributorRole::Author,
form: ContributorForm::Short,
and: Some(AndOptions::Text),
..Default::default()
}),
tc_date!(Issued, Year, prefix = " "),
]
}
pub fn author_date_bibliography() -> Vec<TemplateComponent> {
vec![
tc_contributor!(Author, Long, suffix = ". "),
tc_date!(Issued, Year, suffix = ". "),
tc_title!(Primary, quote = true, suffix = " "),
tc_title!(ParentSerial, emph = true, suffix = " "),
tc_number!(Volume),
tc_number!(Issue, wrap = WrapPunctuation::Parentheses),
tc_number!(Pages, prefix = ": ", suffix = ". "),
tc_variable!(Doi, prefix = "https://doi.org/"),
]
}