Skip to content

Commit

Permalink
Update to tf_article()
Browse files Browse the repository at this point in the history
  • Loading branch information
cderv committed Dec 27, 2023
1 parent 7d10328 commit edf1d26
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 28 deletions.
13 changes: 13 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# rticles (development version)

- Update `tf_article()` template to latest bundle update from `InteractCADLaTeX` v1.04 - May 2023.
- `thanks: true` will now show the contact information will all authors. Use

```yaml
thanks:
author:
- name: Author 1
email: email 1
```
to add specific authors.
- `biblio-style` is now supported. It is set by defauilt to `tfcad.bst` for `T&F standard Chicago author-date` style.

# rticles 0.26

## MAJOR CHANGES
Expand Down
9 changes: 7 additions & 2 deletions inst/rmarkdown/templates/tf/resources/template.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% interactcadsample.tex
% v1.03 - April 2017
% v1.04 - May 2023

\documentclass[$for(classoption)$$classoption$$sep$,$endfor$]{interact}

Expand Down Expand Up @@ -159,7 +159,12 @@
\affil{$for(affiliation)$$$^{$affiliation.num$}$$$affiliation.address$$sep$; $endfor$}
}

$if(thanks)$
$if(thanks.author)$
\thanks{CONTACT $for(thanks.author)$$thanks.author.name$. Email: $thanks.author.email$$sep$, $endfor$}
$endif$
\thanks{CONTACT $for(author)$$author.name$. Email: $author.email$$sep$, $endfor$}
$endif$

\maketitle

Expand All @@ -178,7 +183,7 @@
$body$

$if(bibliography)$
\bibliographystyle{tfcad}
\bibliographystyle{$if(biblio-style)$$biblio-style$$else$tfcad$endif$}
\bibliography{$bibliography$}
$endif$

Expand Down
22 changes: 12 additions & 10 deletions inst/rmarkdown/templates/tf/skeleton/interactcadsample.bib
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@

@PRESENTATION{Ade09,
author = {Adelman, Rachel},
year = 2009,
title = {`Such Stuff as Dreams Are Made On': {G}od's {F}ootstool in the {A}ramaic {T}argumim and {M}idrashic Tradition},
organization = {Paper presented at the annual meeting for the Society of Biblical Literature},
month = nov # "~21–-24",
address = {New Orleans, Louisiana}}

@ARTICLE{Alb05,
author = {Albiston, Catherine R.},
year = 2005,
title = {Bargaining in the Shadow of Social Institutions: Competing Discourses and Social Change in the Workplace Mobilization of Civil Rights},
journal = {Law and Society Review},
volume = 39,
number = 1,
pages = {11--47}}
pages = {11--47},
doi = {10.1111/j.0023-9216.2005.00076.x}}

@ARTICLE{Blair1977,
author = {Blair, Walter},
year = 1977,
title = {Americanized Comic Braggarts},
journal = {Critical Inquiry},
volume = 4,
number = 2,
pages = {331--349},
doi = {10.1086/447940}}
6 changes: 5 additions & 1 deletion inst/rmarkdown/templates/tf/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ affiliation:
Muenster University of Applied Sciences -
Institute for Infrastructure, Water, Resources, Environment,
Correnstr. 25, 48149 Münster, Germany
thanks:
author:
- name: A. N. Author
email: latex.helpdesk@tandf.co.uk
bibliography: interactcadsample.bib
appendix: appendix.tex
abstract: |
Expand Down Expand Up @@ -380,4 +384,4 @@ If a reference has no author or editor, order by title; if a date of publication

The following list shows some sample references prepared in the Taylor & Francis Chicago author-date style.

[@Ade09; @Alb05]
[@Blair1977; @Alb05]
67 changes: 52 additions & 15 deletions inst/rmarkdown/templates/tf/skeleton/tfcad.bst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
%%
%% This is file `tfcad.bst',
%% generated with the docstrip utility,
%% modified by DjL 2017/04/18
%% modified by KWS 2023/05/02
%% -------------------------------------
%%
%% *** BibTeX style for Taylor & Francis Chicago author-date reference style
%% as described at
%% http://www.tandf.co.uk/journals/authors/style/reference/tf_ChicagoAD.pdf ***
%% https://files.taylorandfrancis.com/tf_chicagoad.pdf ***
%%
% ===================================================================
% IMPORTANT NOTICE:
Expand Down Expand Up @@ -59,6 +59,7 @@ ENTRY
booktitle
chapter
collaboration
doi
edition
editor
eid
Expand All @@ -77,6 +78,7 @@ ENTRY
school
series
title
translator
type
url
urldate
Expand Down Expand Up @@ -307,18 +309,18 @@ FUNCTION {bbl.rd}
FUNCTION {bbl.th}
{ "th" }

MACRO {jan} {"Jan."}
MACRO {feb} {"Feb."}
MACRO {mar} {"Mar."}
MACRO {apr} {"Apr."}
MACRO {jan} {"January"}
MACRO {feb} {"February"}
MACRO {mar} {"March"}
MACRO {apr} {"April"}
MACRO {may} {"May"}
MACRO {jun} {"Jun."}
MACRO {jul} {"Jul."}
MACRO {aug} {"Aug."}
MACRO {sep} {"Sep."}
MACRO {oct} {"Oct."}
MACRO {nov} {"Nov."}
MACRO {dec} {"Dec."}
MACRO {jun} {"June"}
MACRO {jul} {"July"}
MACRO {aug} {"August"}
MACRO {sep} {"September"}
MACRO {oct} {"October"}
MACRO {nov} {"November"}
MACRO {dec} {"December"}

FUNCTION {eng.ord}
{ duplicate$ "1" swap$ *
Expand Down Expand Up @@ -785,6 +787,14 @@ FUNCTION {convert.edition}
t
}

FUNCTION {format.translator}
{ translator "translator" format.names.ed
duplicate$ empty$ 'skip$
{
"Translated by " swap$ *
} if$
}

FUNCTION {format.edition}
{ edition duplicate$ empty$ 'skip$
{
Expand Down Expand Up @@ -1047,6 +1057,13 @@ FUNCTION {format.month}
if$
}

FUNCTION {format.doi}
{ doi empty$
{ "" }
{"https://doi.org/{" doi * "}" * }
if$
}

FUNCTION {article}
{ output.bibitem
format.authors "author" output.check
Expand All @@ -1070,6 +1087,7 @@ FUNCTION {article}
if$
new.block
format.note output
format.doi output
format.url output
fin.entry
}
Expand All @@ -1092,7 +1110,9 @@ FUNCTION {book}
format.btitle "title" output.check
new.sentence%
crossref missing$
{ format.edition output
{ format.translator output
new.sentence%
format.edition output
format.bvolume output
format.number.series output
new.sentence
Expand Down Expand Up @@ -1169,6 +1189,8 @@ FUNCTION {incollection}
new.block
format.title "title" output.check
end.quote.title
format.translator output
new.sentence%
crossref missing$
{ format.in.ed.booktitle "booktitle" output.check
end.quote.btitle
Expand Down Expand Up @@ -1276,6 +1298,20 @@ FUNCTION {misc}
fin.entry
}

FUNCTION {online}
{ output.bibitem
format.authors output
author format.key output
format.date "year" output.check
new.block
format.title "title" output.check
end.quote.title
organization output
new.sentence%
format.url output
fin.entry
}

FUNCTION {phdthesis}
{ output.bibitem
format.authors "author" output.check
Expand Down Expand Up @@ -1303,7 +1339,8 @@ FUNCTION {presentation}
end.quote.title
organization output
address output
format.month output%
format.month output
format.date "year" output.check%
new.sentence
format.note output
new.sentence
Expand Down

0 comments on commit edf1d26

Please sign in to comment.