From c9c1c37b2c8d401f9600829830f4dce5702c4054 Mon Sep 17 00:00:00 2001 From: Duncan Luguern Date: Tue, 3 Mar 2020 23:49:24 +0100 Subject: [PATCH 01/11] Add first version of the CVPR rticle model --- NAMESPACE | 1 + R/cvpr_article.R | 41 + .../cvpr_article/resources/template.tex | 76 ++ .../templates/cvpr_article/skeleton/cvpr.sty | 249 ++++ .../cvpr_article/skeleton/cvpr_eso.sty | 109 ++ .../templates/cvpr_article/skeleton/egbib.bib | 44 + .../cvpr_article/skeleton/eso-pic.sty | 267 ++++ .../cvpr_article/skeleton/ieee_fullname.bst | 1135 +++++++++++++++++ .../cvpr_article/skeleton/skeleton.Rmd | 68 + .../templates/cvpr_article/template.yaml | 5 + 10 files changed, 1995 insertions(+) create mode 100644 R/cvpr_article.R create mode 100644 inst/rmarkdown/templates/cvpr_article/resources/template.tex create mode 100644 inst/rmarkdown/templates/cvpr_article/skeleton/cvpr.sty create mode 100644 inst/rmarkdown/templates/cvpr_article/skeleton/cvpr_eso.sty create mode 100644 inst/rmarkdown/templates/cvpr_article/skeleton/egbib.bib create mode 100644 inst/rmarkdown/templates/cvpr_article/skeleton/eso-pic.sty create mode 100644 inst/rmarkdown/templates/cvpr_article/skeleton/ieee_fullname.bst create mode 100644 inst/rmarkdown/templates/cvpr_article/skeleton/skeleton.Rmd create mode 100644 inst/rmarkdown/templates/cvpr_article/template.yaml diff --git a/NAMESPACE b/NAMESPACE index 1a89fd193..905a12c71 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -14,6 +14,7 @@ export(ctex) export(elsevier_article) export(frontiers_article) export(ieee_article) +export(cvpr_article) export(joss_article) export(jss_article) export(mdpi_article) diff --git a/R/cvpr_article.R b/R/cvpr_article.R new file mode 100644 index 000000000..389075150 --- /dev/null +++ b/R/cvpr_article.R @@ -0,0 +1,41 @@ +#' CVPR conference format. +#' @inheritParams rmarkdown::pdf_document +#' @param draftmode Specify the draft mode to control spacing and whether images +#' should be rendered. Valid options are: \code{"final"} (default), \code{"draft"}, +#' \code{"draftcls"}, or \code{"draftclsnofoot"}. +#' @param hyphenfixes A \code{character} value that provides the correct +#' hyphenations for ambiguous words. Separate new words with spaces. +#' @param ... Additional arguments to \code{rmarkdown::pdf_document} +#' +#' @references +#' \url{cvpr2020.thecvf.com/sites/default/files/2019-09/cvpr2020AuthorKit.tar} +#' @export +cvpr_article <- function( + draftmode = c("final", "draft", "draftcls", "draftclsnofoot"), + hyphenfixes = "op-tical net-works semi-conduc-tor", + keep_tex = TRUE, + pandoc_args = NULL, + md_extensions = c("-autolink_bare_uris"), + ... +) { + + args <- c() + + draftmode <- match.arg(draftmode) + args <- c(args, "draftmode" = draftmode) + args <- c(args, "hyphenfixes" = hyphenfixes) + + # pandoc_variable_arg not exported from rmarkdown + pandoc_arg_variable <- function(var_name, value) { + c("-V", paste0(var_name, "=", value)) + } + + # Convert to pandoc arguments + pandoc_arg_list <- mapply(pandoc_arg_variable, names(args), args) + + pdf_document_format( + "cvpr_article", pandoc_args = c(pandoc_arg_list, pandoc_args), + keep_tex = keep_tex, md_extensions = md_extensions, + ... + ) +} diff --git a/inst/rmarkdown/templates/cvpr_article/resources/template.tex b/inst/rmarkdown/templates/cvpr_article/resources/template.tex new file mode 100644 index 000000000..200690f4c --- /dev/null +++ b/inst/rmarkdown/templates/cvpr_article/resources/template.tex @@ -0,0 +1,76 @@ +\documentclass[$if(classoption)$$classoption$$else$10pt,twocolumn,letterpaper$endif$]{article} + +\usepackage{cvpr} +\usepackage{times} +\usepackage{epsfig} +\usepackage{graphicx} +\usepackage{amsmath} +\usepackage{amssymb} + +% Include other packages here, before hyperref. + +% If you comment hyperref and then uncomment it, you should delete +% egpaper.aux before re-running latex. (Or just hit 'q' on the first latex +% run, let it finish, and you should be clear). +\usepackage[$if(finalcopy)$$else$pagebackref=true,letterpaper=true,colorlinks,$endif$breaklinks=true,bookmarks=false]{hyperref} + +% Pandoc header +$for(header-includes)$ +$header-includes$ +$endfor$ + +$if(finalcopy)$ +\cvprfinalcopy +$endif$ + +\def\cvprPaperID{$paper_id$} +\def\httilde{\mbox{\tt\raisebox{-.5ex}{\symbol{126}}}} + +% Pages are numbered in submission mode, and unnumbered in camera-ready +$if(first_page)$ +\setcounter{page}{$first_page$} +$else$ +\ifcvprfinal\pagestyle{empty}\fi +$endif$ +\begin{document} + +%%%%%%%%% TITLE +\title{$title$} + +\author{ +$if(affiliation)$ +$for(affiliation)$ +$for(affiliation.author)$ +$affiliation.author.name$\\ +$endfor$ +$affiliation.institution.name$ \\ +$affiliation.institution.address$ \\ +$for(affiliation.author)$ +{\tt\small $affiliation.author.mail$} +$sep$\\ +$endfor$ +$if(affiliation.institution.mail)$ +{\tt\small $affiliation.institution.mail$} +$endif$ +$sep$\and +$endfor$ +$endif$ +} + +\maketitle +%\thispagestyle{empty} + +%%%%%%%%% ABSTRACT +\begin{abstract} + $abstract$ +\end{abstract} + +%%%%%%%%% BODY TEXT +$body$ + +{\small +\bibliographystyle{$biblio-style$} +\bibliography{$biblio-files$} +} + +\end{document} diff --git a/inst/rmarkdown/templates/cvpr_article/skeleton/cvpr.sty b/inst/rmarkdown/templates/cvpr_article/skeleton/cvpr.sty new file mode 100644 index 000000000..e80878dbd --- /dev/null +++ b/inst/rmarkdown/templates/cvpr_article/skeleton/cvpr.sty @@ -0,0 +1,249 @@ +% --------------------------------------------------------------- +% +% $Id: cvpr.sty,v 1.3 2005/10/24 19:56:15 awf Exp $ +% +% by Paolo.Ienne@di.epfl.ch +% some mods by awf@acm.org +% +% --------------------------------------------------------------- +% +% no guarantee is given that the format corresponds perfectly to +% IEEE 8.5" x 11" Proceedings, but most features should be ok. +% +% --------------------------------------------------------------- +% with LaTeX2e: +% ============= +% +% use as +% \documentclass[times,10pt,twocolumn]{article} +% \usepackage{latex8} +% \usepackage{times} +% +% --------------------------------------------------------------- + +% with LaTeX 2.09: +% ================ +% +% use as +% \documentstyle[times,art10,twocolumn,latex8]{article} +% +% --------------------------------------------------------------- +% with both versions: +% =================== +% +% specify \cvprfinalcopy to emit the final camera-ready copy +% +% specify references as +% \bibliographystyle{ieee} +% \bibliography{...your files...} +% +% --------------------------------------------------------------- + +\usepackage{eso-pic} +\usepackage{xspace} + +\typeout{CVPR 8.5 x 11-Inch Proceedings Style `cvpr.sty'.} + +% ten point helvetica bold required for captions +% eleven point times bold required for second-order headings +% in some sites the name of the fonts may differ, +% change the name here: +\font\cvprtenhv = phvb at 8pt % *** IF THIS FAILS, SEE cvpr.sty *** +\font\elvbf = ptmb scaled 1100 + +% If the above lines give an error message, try to comment them and +% uncomment these: +%\font\cvprtenhv = phvb7t at 8pt +%\font\elvbf = ptmb7t scaled 1100 + +% set dimensions of columns, gap between columns, and paragraph indent +\setlength{\textheight}{8.875in} +\setlength{\textwidth}{6.875in} +\setlength{\columnsep}{0.3125in} +\setlength{\topmargin}{0in} +\setlength{\headheight}{0in} +\setlength{\headsep}{0in} +\setlength{\parindent}{1pc} +\setlength{\oddsidemargin}{-.304in} +\setlength{\evensidemargin}{-.304in} + +\newif\ifcvprfinal +\cvprfinalfalse +\def\cvprfinalcopy{\global\cvprfinaltrue} + +% memento from size10.clo +% \normalsize{\@setfontsize\normalsize\@xpt\@xiipt} +% \small{\@setfontsize\small\@ixpt{11}} +% \footnotesize{\@setfontsize\footnotesize\@viiipt{9.5}} +% \scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt} +% \tiny{\@setfontsize\tiny\@vpt\@vipt} +% \large{\@setfontsize\large\@xiipt{14}} +% \Large{\@setfontsize\Large\@xivpt{18}} +% \LARGE{\@setfontsize\LARGE\@xviipt{22}} +% \huge{\@setfontsize\huge\@xxpt{25}} +% \Huge{\@setfontsize\Huge\@xxvpt{30}} + +\def\@maketitle + { + \newpage + \null + \vskip .375in + \begin{center} + {\Large \bf \@title \par} + % additional two empty lines at the end of the title + \vspace*{24pt} + { + \large + \lineskip .5em + \begin{tabular}[t]{c} + \ifcvprfinal\@author\else Anonymous CVPR submission\\ + \vspace*{1pt}\\%This space will need to be here in the final copy, so don't squeeze it out for the review copy. +Paper ID \cvprPaperID \fi + \end{tabular} + \par + } + % additional small space at the end of the author name + \vskip .5em + % additional empty line at the end of the title block + \vspace*{12pt} + \end{center} + } + +\def\abstract + {% + \centerline{\large\bf Abstract}% + \vspace*{12pt}% + \it% + } + +\def\endabstract + { + % additional empty line at the end of the abstract + \vspace*{12pt} + } + +\def\affiliation#1{\gdef\@affiliation{#1}} \gdef\@affiliation{} + +\newlength{\@ctmp} +\newlength{\@figindent} +\setlength{\@figindent}{1pc} + +\long\def\@makecaption#1#2{ + \setbox\@tempboxa\hbox{\small \noindent #1.~#2} + \setlength{\@ctmp}{\hsize} + \addtolength{\@ctmp}{-\@figindent}\addtolength{\@ctmp}{-\@figindent} + % IF longer than one indented paragraph line + \ifdim \wd\@tempboxa >\@ctmp + % THEN DON'T set as an indented paragraph + {\small #1.~#2\par} + \else + % ELSE center + \hbox to\hsize{\hfil\box\@tempboxa\hfil} + \fi} + +% correct heading spacing and type +\def\cvprsection{\@startsection {section}{1}{\z@} + {10pt plus 2pt minus 2pt}{7pt} {\large\bf}} +\def\cvprssect#1{\cvprsection*{#1}} +\def\cvprsect#1{\cvprsection{\hskip -1em.~#1}} +\def\section{\@ifstar\cvprssect\cvprsect} + +\def\cvprsubsection{\@startsection {subsection}{2}{\z@} + {8pt plus 2pt minus 2pt}{6pt} {\elvbf}} +\def\cvprssubsect#1{\cvprsubsection*{#1}} +\def\cvprsubsect#1{\cvprsubsection{\hskip -1em.~#1}} +\def\subsection{\@ifstar\cvprssubsect\cvprsubsect} + +%% --------- Page background marks: Ruler and confidentiality + +% ----- define vruler +\makeatletter +\newbox\cvprrulerbox +\newcount\cvprrulercount +\newdimen\cvprruleroffset +\newdimen\cv@lineheight +\newdimen\cv@boxheight +\newbox\cv@tmpbox +\newcount\cv@refno +\newcount\cv@tot +% NUMBER with left flushed zeros \fillzeros[] +\newcount\cv@tmpc@ \newcount\cv@tmpc +\def\fillzeros[#1]#2{\cv@tmpc@=#2\relax\ifnum\cv@tmpc@<0\cv@tmpc@=-\cv@tmpc@\fi +\cv@tmpc=1 % +\loop\ifnum\cv@tmpc@<10 \else \divide\cv@tmpc@ by 10 \advance\cv@tmpc by 1 \fi + \ifnum\cv@tmpc@=10\relax\cv@tmpc@=11\relax\fi \ifnum\cv@tmpc@>10 \repeat +\ifnum#2<0\advance\cv@tmpc1\relax-\fi +\loop\ifnum\cv@tmpc<#1\relax0\advance\cv@tmpc1\relax\fi \ifnum\cv@tmpc<#1 \repeat +\cv@tmpc@=#2\relax\ifnum\cv@tmpc@<0\cv@tmpc@=-\cv@tmpc@\fi \relax\the\cv@tmpc@}% +% \makevruler[][][][][] +\def\makevruler[#1][#2][#3][#4][#5]{\begingroup\offinterlineskip +\textheight=#5\vbadness=10000\vfuzz=120ex\overfullrule=0pt% +\global\setbox\cvprrulerbox=\vbox to \textheight{% +{\parskip=0pt\hfuzz=150em\cv@boxheight=\textheight +\cv@lineheight=#1\global\cvprrulercount=#2% +\cv@tot\cv@boxheight\divide\cv@tot\cv@lineheight\advance\cv@tot2% +\cv@refno1\vskip-\cv@lineheight\vskip1ex% +\loop\setbox\cv@tmpbox=\hbox to0cm{{\cvprtenhv\hfil\fillzeros[#4]\cvprrulercount}}% +\ht\cv@tmpbox\cv@lineheight\dp\cv@tmpbox0pt\box\cv@tmpbox\break +\advance\cv@refno1\global\advance\cvprrulercount#3\relax +\ifnum\cv@refno<\cv@tot\repeat}}\endgroup}% +\makeatother +% ----- end of vruler + +% \makevruler[][][][][] +\def\cvprruler#1{\makevruler[12pt][#1][1][3][0.993\textheight]\usebox{\cvprrulerbox}} +\AddToShipoutPicture{% +\ifcvprfinal\else + %\AtTextLowerLeft{% + % \color[gray]{.15}\framebox(\LenToUnit{\textwidth},\LenToUnit{\textheight}){} + %} +\cvprruleroffset=\textheight +\advance\cvprruleroffset by -3.7pt + \color[rgb]{.5,.5,1} + \AtTextUpperLeft{% + \put(\LenToUnit{-35pt},\LenToUnit{-\cvprruleroffset}){%left ruler + \cvprruler{\cvprrulercount}} + \put(\LenToUnit{\textwidth\kern 30pt},\LenToUnit{-\cvprruleroffset}){%right ruler + \cvprruler{\cvprrulercount}} + } +\def\pid{\parbox{1in}{\begin{center}\bf\sf{\small CVPR}\\\#\cvprPaperID\end{center}}} + \AtTextUpperLeft{%paperID in corners + \put(\LenToUnit{-65pt},\LenToUnit{45pt}){\pid} + \put(\LenToUnit{\textwidth\kern-8pt},\LenToUnit{45pt}){\pid} + } + \AtTextUpperLeft{%confidential + \put(0,\LenToUnit{1cm}){\parbox{\textwidth}{\centering\cvprtenhv + CVPR 2020 Submission \#\cvprPaperID. CONFIDENTIAL REVIEW COPY. DO NOT DISTRIBUTE.}} + } +\fi +} + +%%% Make figure placement a little more predictable. +% We trust the user to move figures if this results +% in ugliness. +% Minimize bad page breaks at figures +\renewcommand{\textfraction}{0.01} +\renewcommand{\floatpagefraction}{0.99} +\renewcommand{\topfraction}{0.99} +\renewcommand{\bottomfraction}{0.99} +\renewcommand{\dblfloatpagefraction}{0.99} +\renewcommand{\dbltopfraction}{0.99} +\setcounter{totalnumber}{99} +\setcounter{topnumber}{99} +\setcounter{bottomnumber}{99} + +% Add a period to the end of an abbreviation unless there's one +% already, then \xspace. +\makeatletter +\DeclareRobustCommand\onedot{\futurelet\@let@token\@onedot} +\def\@onedot{\ifx\@let@token.\else.\null\fi\xspace} + +\def\eg{\emph{e.g}\onedot} \def\Eg{\emph{E.g}\onedot} +\def\ie{\emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot} +\def\cf{\emph{c.f}\onedot} \def\Cf{\emph{C.f}\onedot} +\def\etc{\emph{etc}\onedot} \def\vs{\emph{vs}\onedot} +\def\wrt{w.r.t\onedot} \def\dof{d.o.f\onedot} +\def\etal{\emph{et al}\onedot} +\makeatother + +% --------------------------------------------------------------- diff --git a/inst/rmarkdown/templates/cvpr_article/skeleton/cvpr_eso.sty b/inst/rmarkdown/templates/cvpr_article/skeleton/cvpr_eso.sty new file mode 100644 index 000000000..70b0a5712 --- /dev/null +++ b/inst/rmarkdown/templates/cvpr_article/skeleton/cvpr_eso.sty @@ -0,0 +1,109 @@ +%% +%% This is file `everyshi.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% everyshi.dtx (with options: `package') +%% +%% Copyright (C) [1994..1999] by Martin Schroeder. All rights reserved. +%% +%% This file is part of the EveryShi package +%% +%% This program may be redistributed and/or modified under the terms +%% of the LaTeX Project Public License, either version 1.0 of this +%% license, or (at your option) any later version. +%% The latest version of this license is in +%% CTAN:macros/latex/base/lppl.txt. +%% +%% Happy users are requested to send me a postcard. :-) +%% +%% The EveryShi package contains these files: +%% +%% everyshi.asc +%% everyshi.dtx +%% everyshi.dvi +%% everyshi.ins +%% everyshi.bug +%% +%% Error Reports in case of UNCHANGED versions to +%% +%% Martin Schr"oder +%% Cr"usemannallee 3 +%% D-28213 Bremen +%% Martin.Schroeder@ACM.org +%% +%% File: everyshi.dtx Copyright (C) 2001 Martin Schr\"oder +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{everyshi} + [2001/05/15 v3.00 EveryShipout Package (MS)] +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +%% \iffalse meta-comment +%% =================================================================== +%% @LaTeX-package-file{ +%% author = {Martin Schr\"oder}, +%% version = "3.00", +%% date = "15 May 2001", +%% filename = "everyshi.sty", +%% address = {Martin Schr\"oder +%% Cr\"usemannallee 3 +%% 28213 Bremen +%% Germany}, +%% telephone = "+49-421-2239425", +%% email = "martin@oneiros.de", +%% pgp-Key = "2048 bit / KeyID 292814E5", +%% pgp-fingerprint = "7E86 6EC8 97FA 2995 82C3 FEA5 2719 090E", +%% docstring = "LaTeX package which provides hooks into +%% \cs{shipout}. +%% } +%% =================================================================== +%% \fi + +\newcommand{\@EveryShipout@Hook}{} +\newcommand{\@EveryShipout@AtNextHook}{} +\newcommand*{\EveryShipout}[1] + {\g@addto@macro\@EveryShipout@Hook{#1}} +\newcommand*{\AtNextShipout}[1] + {\g@addto@macro\@EveryShipout@AtNextHook{#1}} +\newcommand{\@EveryShipout@Shipout}{% + \afterassignment\@EveryShipout@Test + \global\setbox\@cclv= % + } +\newcommand{\@EveryShipout@Test}{% + \ifvoid\@cclv\relax + \aftergroup\@EveryShipout@Output + \else + \@EveryShipout@Output + \fi% + } +\newcommand{\@EveryShipout@Output}{% + \@EveryShipout@Hook% + \@EveryShipout@AtNextHook% + \gdef\@EveryShipout@AtNextHook{}% + \@EveryShipout@Org@Shipout\box\@cclv% + } +\newcommand{\@EveryShipout@Org@Shipout}{} +\newcommand*{\@EveryShipout@Init}{% + \message{ABD: EveryShipout initializing macros}% + \let\@EveryShipout@Org@Shipout\shipout + \let\shipout\@EveryShipout@Shipout + } +\AtBeginDocument{\@EveryShipout@Init} +\endinput +%% +%% End of file `everyshi.sty'. diff --git a/inst/rmarkdown/templates/cvpr_article/skeleton/egbib.bib b/inst/rmarkdown/templates/cvpr_article/skeleton/egbib.bib new file mode 100644 index 000000000..04a8275ec --- /dev/null +++ b/inst/rmarkdown/templates/cvpr_article/skeleton/egbib.bib @@ -0,0 +1,44 @@ + +@misc{Authors14, + author = {Authors}, + title = {The frobnicatable foo filter}, + note = {Face and Gesture submission ID 324. Supplied as additional material {\tt fg324.pdf}}, + year = 2014 +} + +@misc{Authors14b, + author = {Authors}, + title = {Frobnication tutorial}, + note = {Supplied as additional material {\tt tr.pdf}}, + year = 2014 +} + +@article{Alpher02, +author = {FirstName Alpher}, +title = {Frobnication}, +journal = {Journal of Foo}, +volume = 12, +number = 1, +pages = {234--778}, +year = 2002 +} + +@article{Alpher03, +author = {FirstName Alpher and FirstName Fotheringham-Smythe}, +title = {Frobnication revisited}, +journal = {Journal of Foo}, +volume = 13, +number = 1, +pages = {234--778}, +year = 2003 +} + +@article{Alpher04, +author = {FirstName Alpher and FirstName Fotheringham-Smythe and FirstName Gamow}, +title = {Can a machine frobnicate?}, +journal = {Journal of Foo}, +volume = 14, +number = 1, +pages = {234--778}, +year = 2004 +} diff --git a/inst/rmarkdown/templates/cvpr_article/skeleton/eso-pic.sty b/inst/rmarkdown/templates/cvpr_article/skeleton/eso-pic.sty new file mode 100644 index 000000000..be9fb4884 --- /dev/null +++ b/inst/rmarkdown/templates/cvpr_article/skeleton/eso-pic.sty @@ -0,0 +1,267 @@ +%% +%% This is file `eso-pic.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% eso-pic.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright (C) 1998-2002 by Rolf Niepraschk +%% +%% This file may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License, either version 1.2 of this license +%% or (at your option) any later version. The latest version of this +%% license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.2 or later is part of all distributions of LaTeX version +%% 1999/12/01 or later. +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{eso-pic} + [2002/11/16 v1.1b eso-pic (RN)] +\input{cvpr_eso.sty} +\newcommand\LenToUnit[1]{#1\@gobble} + +\newcommand\AtPageUpperLeft[1]{% + \begingroup + \@tempdima=0pt\relax\@tempdimb=\ESO@yoffsetI\relax + \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb}){#1}% + \endgroup +} +\newcommand\AtPageLowerLeft[1]{\AtPageUpperLeft{% + \put(0,\LenToUnit{-\paperheight}){#1}}} +\newcommand\AtPageCenter[1]{\AtPageUpperLeft{% + \put(\LenToUnit{.5\paperwidth},\LenToUnit{-.5\paperheight}){#1}}% +} +\newcommand\AtTextUpperLeft[1]{% + \begingroup + \setlength\@tempdima{1in}% + \ifodd\c@page% + \advance\@tempdima\oddsidemargin% + \else% + \advance\@tempdima\evensidemargin% + \fi% + \@tempdimb=\ESO@yoffsetI\relax\advance\@tempdimb-1in\relax% + \advance\@tempdimb-\topmargin% + \advance\@tempdimb-\headheight\advance\@tempdimb-\headsep% + \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb}){#1}% + \endgroup +} +\newcommand\AtTextLowerLeft[1]{\AtTextUpperLeft{% + \put(0,\LenToUnit{-\textheight}){#1}}} +\newcommand\AtTextCenter[1]{\AtTextUpperLeft{% + \put(\LenToUnit{.5\textwidth},\LenToUnit{-.5\textheight}){#1}}} +\newcommand{\ESO@HookI}{} \newcommand{\ESO@HookII}{} +\newcommand{\ESO@HookIII}{} +\newcommand{\AddToShipoutPicture}{% + \@ifstar{\g@addto@macro\ESO@HookII}{\g@addto@macro\ESO@HookI}} +\newcommand{\ClearShipoutPicture}{\global\let\ESO@HookI\@empty} +\newcommand\ESO@isMEMOIR[1]{} +\@ifclassloaded{memoir}{\renewcommand\ESO@isMEMOIR[1]{#1}}{} +\newcommand{\@ShipoutPicture}{% + \bgroup + \@tempswafalse% + \ifx\ESO@HookI\@empty\else\@tempswatrue\fi% + \ifx\ESO@HookII\@empty\else\@tempswatrue\fi% + \ifx\ESO@HookIII\@empty\else\@tempswatrue\fi% + \if@tempswa% + \@tempdima=1in\@tempdimb=-\@tempdima% + \advance\@tempdimb\ESO@yoffsetI% + \ESO@isMEMOIR{% + \advance\@tempdima\trimedge% + \advance\@tempdima\paperwidth% + \advance\@tempdima-\stockwidth% + \if@twoside\ifodd\c@page\else% + \advance\@tempdima-2\trimedge% + \advance\@tempdima-\paperwidth% + \advance\@tempdima\stockwidth% + \fi\fi% + \advance\@tempdimb\trimtop}% + \unitlength=1pt% + \global\setbox\@cclv\vbox{% + \vbox{\let\protect\relax + \pictur@(0,0)(\strip@pt\@tempdima,\strip@pt\@tempdimb)% + \ESO@HookIII\ESO@HookI\ESO@HookII% + \global\let\ESO@HookII\@empty% + \endpicture}% + \nointerlineskip% + \box\@cclv}% + \fi + \egroup +} +\EveryShipout{\@ShipoutPicture} +\RequirePackage{keyval} +\newif\ifESO@dvips\ESO@dvipsfalse \newif\ifESO@grid\ESO@gridfalse +\newif\ifESO@texcoord\ESO@texcoordfalse +\newcommand*\ESO@gridunitname{} +\newcommand*\ESO@gridunit{} +\newcommand*\ESO@labelfactor{} +\newcommand*\ESO@griddelta{}\newcommand*\ESO@griddeltaY{} +\newcommand*\ESO@gridDelta{}\newcommand*\ESO@gridDeltaY{} +\newcommand*\ESO@gridcolor{} +\newcommand*\ESO@subgridcolor{} +\newcommand*\ESO@subgridstyle{dotted}% ??? +\newcommand*\ESO@gap{} +\newcommand*\ESO@yoffsetI{}\newcommand*\ESO@yoffsetII{} +\newcommand*\ESO@gridlines{\thinlines} +\newcommand*\ESO@subgridlines{\thinlines} +\newcommand*\ESO@hline[1]{\ESO@subgridlines\line(1,0){#1}} +\newcommand*\ESO@vline[1]{\ESO@subgridlines\line(0,1){#1}} +\newcommand*\ESO@Hline[1]{\ESO@gridlines\line(1,0){#1}} +\newcommand*\ESO@Vline[1]{\ESO@gridlines\line(0,1){#1}} +\newcommand\ESO@fcolorbox[4][]{\fbox{#4}} +\newcommand\ESO@color[1]{} +\newcommand\ESO@colorbox[3][]{% + \begingroup + \fboxrule=0pt\fbox{#3}% + \endgroup +} +\newcommand\gridSetup[6][]{% + \edef\ESO@gridunitname{#1}\edef\ESO@gridunit{#2} + \edef\ESO@labelfactor{#3}\edef\ESO@griddelta{#4} + \edef\ESO@gridDelta{#5}\edef\ESO@gap{#6}} +\define@key{ESO}{texcoord}[true]{\csname ESO@texcoord#1\endcsname} +\define@key{ESO}{pscoord}[true]{\csname @tempswa#1\endcsname + \if@tempswa\ESO@texcoordfalse\else\ESO@texcoordtrue\fi} +\define@key{ESO}{dvips}[true]{\csname ESO@dvips#1\endcsname} +\define@key{ESO}{grid}[true]{\csname ESO@grid#1\endcsname + \setkeys{ESO}{gridcolor=black,subgridcolor=black}} +\define@key{ESO}{colorgrid}[true]{\csname ESO@grid#1\endcsname + \setkeys{ESO}{gridcolor=red,subgridcolor=green}} +\define@key{ESO}{gridcolor}{\def\ESO@gridcolor{#1}} +\define@key{ESO}{subgridcolor}{\def\ESO@subgridcolor{#1}} +\define@key{ESO}{subgridstyle}{\def\ESO@subgridstyle{#1}}% +\define@key{ESO}{gridunit}{% + \def\@tempa{#1} + \def\@tempb{bp} + \ifx\@tempa\@tempb + \gridSetup[\@tempa]{1bp}{1}{10}{50}{2} + \else + \def\@tempb{pt} + \ifx\@tempa\@tempb + \gridSetup[\@tempa]{1pt}{1}{10}{50}{2} + \else + \def\@tempb{in} + \ifx\@tempa\@tempb + \gridSetup[\@tempa]{.1in}{.1}{2}{10}{.5} + \else + \gridSetup[mm]{1mm}{1}{5}{20}{1} + \fi + \fi + \fi +} +\setkeys{ESO}{subgridstyle=solid,pscoord=true,gridunit=mm} +\def\ProcessOptionsWithKV#1{% + \let\@tempc\@empty + \@for\CurrentOption:=\@classoptionslist\do{% + \@ifundefined{KV@#1@\CurrentOption}% + {}{\edef\@tempc{\@tempc,\CurrentOption,}}}% + \edef\@tempc{% + \noexpand\setkeys{#1}{\@tempc\@ptionlist{\@currname.\@currext}}}% + \@tempc + \AtEndOfPackage{\let\@unprocessedoptions\relax}}% +\ProcessOptionsWithKV{ESO}% +\newcommand\ESO@div[2]{% + \@tempdima=#1\relax\@tempdimb=\ESO@gridunit\relax + \@tempdimb=#2\@tempdimb\divide\@tempdima by \@tempdimb% + \@tempcnta\@tempdima\advance\@tempcnta\@ne} +\AtBeginDocument{% + \IfFileExists{color.sty} + {% + \RequirePackage{color} + \let\ESO@color=\color\let\ESO@colorbox=\colorbox + \let\ESO@fcolorbox=\fcolorbox + }{} + \@ifundefined{Gin@driver}{}% + {% + \ifx\Gin@driver\@empty\else% + \filename@parse{\Gin@driver}\def\reserved@a{dvips}% + \ifx\filename@base\reserved@a\ESO@dvipstrue\fi% + \fi + }% + \ifx\pdfoutput\undefined\else + \ifx\pdfoutput\relax\else + \ifcase\pdfoutput\else + \ESO@dvipsfalse% + \fi + \fi + \fi + \ifESO@dvips\def\@tempb{eepic}\else\def\@tempb{epic}\fi + \def\@tempa{dotted}%\def\ESO@gap{\LenToUnit{6\@wholewidth}}% + \ifx\@tempa\ESO@subgridstyle + \IfFileExists{\@tempb.sty}% + {% + \RequirePackage{\@tempb} + \renewcommand*\ESO@hline[1]{\ESO@subgridlines\dottedline{\ESO@gap}% + (0,0)(##1,0)} + \renewcommand*\ESO@vline[1]{\ESO@subgridlines\dottedline{\ESO@gap}% + (0,0)(0,##1)} + }{} + \else + \ifx\ESO@gridcolor\ESO@subgridcolor% + \renewcommand*\ESO@gridlines{\thicklines} + \fi + \fi +} +\ifESO@texcoord + \def\ESO@yoffsetI{0pt}\def\ESO@yoffsetII{-\paperheight} + \edef\ESO@griddeltaY{-\ESO@griddelta}\edef\ESO@gridDeltaY{-\ESO@gridDelta} +\else + \def\ESO@yoffsetI{\paperheight}\def\ESO@yoffsetII{0pt} + \edef\ESO@griddeltaY{\ESO@griddelta}\edef\ESO@gridDeltaY{\ESO@gridDelta} +\fi +\newcommand\ESO@gridpicture{% + \begingroup + \setlength\unitlength{\ESO@gridunit}% + \ESO@color{\ESO@subgridcolor}% + \ESO@div{\paperheight}{\ESO@griddelta}% + \multiput(0,0)(0,\ESO@griddeltaY){\@tempcnta}% + {\ESO@hline{\LenToUnit{\paperwidth}}}% + \ESO@div{\paperwidth}{\ESO@griddelta}% + \multiput(0,\LenToUnit{\ESO@yoffsetII})(\ESO@griddelta,0){\@tempcnta}% + {\ESO@vline{\LenToUnit{\paperheight}}}% + \ESO@color{\ESO@gridcolor}% + \ESO@div{\paperheight}{\ESO@gridDelta}% + \multiput(0,0)(0,\ESO@gridDeltaY){\@tempcnta}% + {\ESO@Hline{\LenToUnit{\paperwidth}}}% + \ESO@div{\paperwidth}{\ESO@gridDelta}% + \multiput(0,\LenToUnit{\ESO@yoffsetII})(\ESO@gridDelta,0){\@tempcnta}% + {\ESO@Vline{\LenToUnit{\paperheight}}}% + \fontsize{10}{12}\normalfont% + \ESO@div{\paperwidth}{\ESO@gridDelta}% + \multiput(0,\ESO@gridDeltaY)(\ESO@gridDelta,0){\@tempcnta}{% + \@tempcntb=\@tempcnta\advance\@tempcntb-\@multicnt% + \ifnum\@tempcntb>1\relax + \multiply\@tempcntb by \ESO@gridDelta\relax% + \@tempdima=\@tempcntb sp\@tempdima=\ESO@labelfactor\@tempdima% + \@tempcntb=\@tempdima% + \makebox(0,0)[c]{\ESO@colorbox{white}{\the\@tempcntb}}% + \fi}% + \ifx\ESO@gridunitname\@empty\def\@tempa{0}\else\def\@tempa{1}\fi% + \ESO@div{\paperheight}{\ESO@gridDelta}% + \multiput(\ESO@gridDelta,0)(0,\ESO@gridDeltaY){\@tempcnta}{% + \@tempcntb=\@tempcnta\advance\@tempcntb-\@multicnt% + \ifnum\@tempcntb>\@tempa\relax + \multiply\@tempcntb by \ESO@gridDelta\relax% + \@tempdima=\@tempcntb sp\@tempdima=\ESO@labelfactor\@tempdima% + \@tempcntb=\@tempdima% + \makebox(0,0)[c]{\ESO@colorbox{white}{\the\@tempcntb}}% + \fi + }% + \ifx\ESO@gridunitname\@empty\else% + \thicklines\fboxrule=\@wholewidth% + \put(\ESO@gridDelta,\ESO@gridDeltaY){\makebox(0,0)[c]{% + \ESO@fcolorbox{\ESO@gridcolor}{white}{% + \textbf{\ESO@gridunitname}}}}% + \fi + \normalcolor% + \endgroup +} +\ifESO@grid\g@addto@macro\ESO@HookIII{\ESO@gridpicture}\fi +\endinput +%% +%% End of file `eso-pic.sty'. diff --git a/inst/rmarkdown/templates/cvpr_article/skeleton/ieee_fullname.bst b/inst/rmarkdown/templates/cvpr_article/skeleton/ieee_fullname.bst new file mode 100644 index 000000000..d9ca122f6 --- /dev/null +++ b/inst/rmarkdown/templates/cvpr_article/skeleton/ieee_fullname.bst @@ -0,0 +1,1135 @@ +% This is a modification to the normal ieee.bst used by CVPR to render +% first names in the bibliography as "Firstname Lastname" rather than +% "F. Lastname". +% +% Jonathan T. Barron, 12/5/2018, jonbarron@gmail.com + +% --------------------------------------------------------------- +% +% ieee.bst,v 1.0 2002/04/16 +% +% by Glenn Paulley (paulley@acm.org) +% +% Modified from latex8.bst 1995/09/15 15:13:49 ienne Exp $ +% +% by Paolo.Ienne@di.epfl.ch +% +% +% --------------------------------------------------------------- +% +% no guarantee is given that the format corresponds perfectly to +% IEEE 8.5" x 11" Proceedings, but most features should be ok. +% +% --------------------------------------------------------------- +% +% `ieee' from BibTeX standard bibliography style `abbrv' +% version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09. +% Copyright (C) 1985, all rights reserved. +% Copying of this file is authorized only if either +% (1) you make absolutely no changes to your copy, including name, or +% (2) if you do make changes, you name it something other than +% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst. +% This restriction helps ensure that all standard styles are identical. +% The file btxbst.doc has the documentation for this style. + +ENTRY + { address + author + booktitle + chapter + edition + editor + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + type + volume + year + } + {} + { label } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := +} + +STRINGS { s t } + +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem{" write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "{\em " swap$ * "}" * } + if$ +} + +INTEGERS { nameptr namesleft numnames } + +FUNCTION {format.names} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + % Formerly { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := + { s nameptr "{ff }{vv }{ll}{, jj}" format.name$ 't := + nameptr #1 > + { namesleft #1 > + { ", " * t * } + { numnames #2 > + { "," * } + 'skip$ + if$ + t "others" = + { " et~al." * } + { " and " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names } + if$ +} + +FUNCTION {format.editors} +{ editor empty$ + { "" } + { editor format.names + editor num.names$ #1 > + { ", editors" * } + { ", editor" * } + if$ + } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title "t" change.case$ } + if$ +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { month " " * year * } + if$ + } + if$ +} + +FUNCTION {format.btitle} +{ title emphasize +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { "volume" volume tie.or.space.connect + series empty$ + 'skip$ + { " of " * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { output.state mid.sentence = + { "number" } + { "Number" } + if$ + number tie.or.space.connect + series empty$ + { "there's a number but no series in " cite$ * warning$ } + { " in " * series * } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { edition "l" change.case$ " edition" * } + { edition "t" change.case$ " edition" * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { "pages" pages n.dashify tie.or.space.connect } + { "page" pages tie.or.space.connect } + if$ + } + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { "(" number * ")" * * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ":" * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + 'format.pages + { type empty$ + { "chapter" } + { type "l" change.case$ } + if$ + chapter tie.or.space.connect + pages empty$ + 'skip$ + { ", " * format.pages * } + if$ + } + if$ +} + +FUNCTION {format.in.ed.booktitle} +{ booktitle empty$ + { "" } + { editor empty$ + { "In " booktitle emphasize * } + { "In " format.editors * ", " * booktitle emphasize * } + if$ + } + if$ +} + +FUNCTION {empty.misc.check} + +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type "t" change.case$ + } + if$ +} + +FUNCTION {format.tr.number} +{ type empty$ + { "Technical Report" } + 'type + if$ + number empty$ + { "t" change.case$ } + { number tie.or.space.connect } + if$ +} + +FUNCTION {format.article.crossref} +{ key empty$ + { journal empty$ + { "need key or journal for " cite$ * " to crossref " * crossref * + warning$ + "" + } + { "In {\em " journal * "\/}" * } + if$ + } + { "In " key * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.crossref.editor} +{ editor #1 "{vv~}{ll}" format.name$ + editor num.names$ duplicate$ + #2 > + { pop$ " et~al." * } + { #2 < + 'skip$ + { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { " et~al." * } + { " and " * editor #2 "{vv~}{ll}" format.name$ * } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.book.crossref} +{ volume empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + "In " + } + { "Volume" volume tie.or.space.connect + " of " * + } + if$ + editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { series empty$ + { "need editor, key, or series for " cite$ * " to crossref " * + crossref * warning$ + "" * + } + { "{\em " * series * "\/}" * } + if$ + } + { key * } + if$ + } + { format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.incoll.inproc.crossref} +{ editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { booktitle empty$ + { "need editor, key, or booktitle for " cite$ * " to crossref " * + crossref * warning$ + "" + } + { "In {\em " booktitle * "\/}" * } + if$ + } + { "In " key * } + if$ + } + { "In " format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {article} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + crossref missing$ + { journal emphasize "journal" output.check + format.vol.num.pages output + format.date "year" output.check + } + { format.article.crossref output.nonnull + format.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {book} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + new.block + format.btitle "title" output.check + crossref missing$ + { format.bvolume output + new.block + format.number.series output + new.sentence + publisher "publisher" output.check + address output + } + { new.block + format.book.crossref output.nonnull + } + if$ + format.edition output + format.date "year" output.check + new.block + note output + fin.entry +} + +FUNCTION {booklet} +{ output.bibitem + format.authors output + new.block + format.title "title" output.check + howpublished address new.block.checkb + howpublished output + address output + format.date output + new.block + note output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check } + { format.authors output.nonnull + + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + new.block + format.btitle "title" output.check + crossref missing$ + { format.bvolume output + format.chapter.pages "chapter and pages" output.check + new.block + format.number.series output + new.sentence + publisher "publisher" output.check + address output + } + { format.chapter.pages "chapter and pages" output.check + new.block + format.book.crossref output.nonnull + } + if$ + format.edition output + format.date "year" output.check + new.block + note output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output + format.chapter.pages output + new.sentence + publisher "publisher" output.check + address output + format.edition output + format.date "year" output.check + } + { format.incoll.inproc.crossref output.nonnull + format.chapter.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output + format.pages output + address empty$ + { organization publisher new.sentence.checkb + organization output + publisher output + format.date "year" output.check + } + { address output.nonnull + format.date "year" output.check + new.sentence + organization output + publisher output + } + if$ + } + { format.incoll.inproc.crossref output.nonnull + format.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + new.block + format.btitle "title" output.check + author empty$ + { organization empty$ + { address new.block.checka + address output + } + 'skip$ + if$ + } + { organization address new.block.checkb + organization output + address output + } + if$ + format.edition output + format.date output + new.block + note output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + "Master's thesis" format.thesis.type output.nonnull + school "school" output.check + address output + format.date "year" output.check + new.block + note output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + title howpublished new.block.checkb + format.title output + howpublished new.block.checka + howpublished output + format.date output + new.block + note output + fin.entry + empty.misc.check +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + new.block + format.btitle "title" output.check + new.block + "PhD thesis" format.thesis.type output.nonnull + school "school" output.check + address output + format.date "year" output.check + new.block + note output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + editor empty$ + { organization output } + { format.editors output.nonnull } + + if$ + new.block + format.btitle "title" output.check + format.bvolume output + format.number.series output + address empty$ + { editor empty$ + { publisher new.sentence.checka } + { organization publisher new.sentence.checkb + organization output + } + if$ + publisher output + format.date "year" output.check + } + { address output.nonnull + format.date "year" output.check + new.sentence + editor empty$ + 'skip$ + { organization output } + if$ + publisher output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + format.tr.number output.nonnull + institution "institution" output.check + address output + format.date "year" output.check + new.block + note output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + note "note" output.check + format.date output + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"Jan."} + +MACRO {feb} {"Feb."} + +MACRO {mar} {"Mar."} + +MACRO {apr} {"Apr."} + +MACRO {may} {"May"} + +MACRO {jun} {"June"} + +MACRO {jul} {"July"} + +MACRO {aug} {"Aug."} + +MACRO {sep} {"Sept."} + +MACRO {oct} {"Oct."} + +MACRO {nov} {"Nov."} + +MACRO {dec} {"Dec."} + +MACRO {acmcs} {"ACM Comput. Surv."} + +MACRO {acta} {"Acta Inf."} + +MACRO {cacm} {"Commun. ACM"} + +MACRO {ibmjrd} {"IBM J. Res. Dev."} + +MACRO {ibmsj} {"IBM Syst.~J."} + +MACRO {ieeese} {"IEEE Trans. Softw. Eng."} + +MACRO {ieeetc} {"IEEE Trans. Comput."} + +MACRO {ieeetcad} + {"IEEE Trans. Comput.-Aided Design Integrated Circuits"} + +MACRO {ipl} {"Inf. Process. Lett."} + +MACRO {jacm} {"J.~ACM"} + +MACRO {jcss} {"J.~Comput. Syst. Sci."} + +MACRO {scp} {"Sci. Comput. Programming"} + +MACRO {sicomp} {"SIAM J. Comput."} + +MACRO {tocs} {"ACM Trans. Comput. Syst."} + +MACRO {tods} {"ACM Trans. Database Syst."} + +MACRO {tog} {"ACM Trans. Gr."} + +MACRO {toms} {"ACM Trans. Math. Softw."} + +MACRO {toois} {"ACM Trans. Office Inf. Syst."} + +MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."} + +MACRO {tcs} {"Theoretical Comput. Sci."} + +READ + +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { nameptr #1 > + { " " * } + 'skip$ + if$ + s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := + nameptr numnames = t "others" = and + { "et al" * } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} + +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {author.organization.sort} +{ author empty$ + + { organization empty$ + { key empty$ + { "to sort, need author, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {editor.organization.sort} +{ editor empty$ + { organization empty$ + { key empty$ + { "to sort, need editor, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { editor sort.format.names } + if$ +} + +FUNCTION {presort} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.sort + { type$ "proceedings" = + 'editor.organization.sort + { type$ "manual" = + 'author.organization.sort + 'author.sort + if$ + } + if$ + } + if$ + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} + +SORT + +STRINGS { longest.label } + +INTEGERS { number.label longest.label.width } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +FUNCTION {longest.label.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +EXECUTE {initialize.longest.label} + +ITERATE {longest.label.pass} + +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" longest.label * "}" * + "\itemsep=-1pt" * % Compact the entries a little. + write$ newline$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} + +% end of file ieee.bst +% --------------------------------------------------------------- + + + diff --git a/inst/rmarkdown/templates/cvpr_article/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/cvpr_article/skeleton/skeleton.Rmd new file mode 100644 index 000000000..2c78ee13e --- /dev/null +++ b/inst/rmarkdown/templates/cvpr_article/skeleton/skeleton.Rmd @@ -0,0 +1,68 @@ +--- +finalcopy: false +paper_id: 1234 +first_page: 9876 +title: Bare Demo of cvpr.sty for CVPR Conferences +affiliation: + - author: + - name: Michael Shell + institution: + name: Georgia Institute of Technology + address: Atlanta, Georgia 30332--0250 + mail: "ece@datech.edu" + - author: + - name: Eldon Tyrell + mail: eldon@starfleet-academy.star + - name: Roy Batty + mail: roy@replicant.offworld + institution: + name: Tyrell Inc. + address: 123 Replicant Street, Los Angeles, USA 90210--4321 +keywords: ["keyword 1", "keyword 2"] +abstract: | + The abstract goes here. + On multiple lines eventually. + +biblio-files: egbib.bib +output: rticles::cvpr_article +--- + +Introduction +============= +This demo file is intended to serve as a ``starter file'' +for CVPR conference papers produced under \LaTeX\ using cvpr2020AuthorKit (cvpr2020.thecvf.com/sites/default/files/2019-09/cvpr2020AuthorKit.tar). + +## Unpublished work +If you are making a submission to another conference at the same time, +which covers similar or overlapping material, you may need to refer to that +submission in order to explain the differences, just as you would if you +had previously published related work. In such cases, include the +anonymized parallel submission~\cite{Authors14} as additional material and +cite it as +\begin{quote} +[1] Authors. ``The frobnicatable foo filter'', F\&G 2014 Submission ID 324, +Supplied as additional material {\tt fg324.pdf}. +\end{quote} +## Subsection Heading Here +Subsection text here. + +### Subsubsection Heading Here +Subsubsection text here. + +Conclusion +============ +The conclusion goes here. + + + +Acknowledgment {#acknowledgment} +============== + +The authors would like to thank... + +Bibliography styles +=================== + +Here are two sample references: @Authors14 [@Alpher02]. + +\newpage diff --git a/inst/rmarkdown/templates/cvpr_article/template.yaml b/inst/rmarkdown/templates/cvpr_article/template.yaml new file mode 100644 index 000000000..40a81916f --- /dev/null +++ b/inst/rmarkdown/templates/cvpr_article/template.yaml @@ -0,0 +1,5 @@ +name: CVPR Conference Article +description: > + Template for creating an article for submission to the CVPR conference +create_dir: true + From 374040d5750608201a1b63cc4074acdbcafc2255 Mon Sep 17 00:00:00 2001 From: Duncan Luguern Date: Sun, 8 Mar 2020 21:44:53 +0100 Subject: [PATCH 02/11] Simplify the bibliography example and the cvpr_article function --- R/article.R | 8 +++++ .../templates/cvpr_article/skeleton/egbib.bib | 30 ------------------- 2 files changed, 8 insertions(+), 30 deletions(-) diff --git a/R/article.R b/R/article.R index c7f3db4bc..8ff18ab50 100644 --- a/R/article.R +++ b/R/article.R @@ -124,6 +124,14 @@ ctex <- function(..., latex_engine = 'xelatex') { pdf_document_format('ctex', latex_engine = latex_engine, ...) } +#' @section \code{cvpr_article}: Format for creating submissions to the CVPR conference. +#' Adapted from \url{http://cvpr2020.thecvf.com/submission/main-conference/author-guidelines#submission-guidelines}. +#' @export +#' @rdname article +cvpr_article <- function(keep_tex = TRUE) +{ + pdf_document_format('cvpr', keep_tex=keep_tex, ...) +} #' @section \code{elsevier_article}: Format for creating submissions to Elsevier #' journals. Adapted from #' \url{https://www.elsevier.com/authors/author-schemas/latex-instructions}. diff --git a/inst/rmarkdown/templates/cvpr_article/skeleton/egbib.bib b/inst/rmarkdown/templates/cvpr_article/skeleton/egbib.bib index 04a8275ec..0bc0c4ffb 100644 --- a/inst/rmarkdown/templates/cvpr_article/skeleton/egbib.bib +++ b/inst/rmarkdown/templates/cvpr_article/skeleton/egbib.bib @@ -12,33 +12,3 @@ @misc{Authors14b note = {Supplied as additional material {\tt tr.pdf}}, year = 2014 } - -@article{Alpher02, -author = {FirstName Alpher}, -title = {Frobnication}, -journal = {Journal of Foo}, -volume = 12, -number = 1, -pages = {234--778}, -year = 2002 -} - -@article{Alpher03, -author = {FirstName Alpher and FirstName Fotheringham-Smythe}, -title = {Frobnication revisited}, -journal = {Journal of Foo}, -volume = 13, -number = 1, -pages = {234--778}, -year = 2003 -} - -@article{Alpher04, -author = {FirstName Alpher and FirstName Fotheringham-Smythe and FirstName Gamow}, -title = {Can a machine frobnicate?}, -journal = {Journal of Foo}, -volume = 14, -number = 1, -pages = {234--778}, -year = 2004 -} From ba080e501d9c929474288c0a4cce3306e445ef93 Mon Sep 17 00:00:00 2001 From: Duncan Luguern Date: Sun, 8 Mar 2020 22:11:29 +0100 Subject: [PATCH 03/11] Update documentation and remove cvpr_article.R file --- NAMESPACE | 2 +- R/article.R | 1 + R/cvpr_article.R | 41 ----------------------------------------- man/article.Rd | 8 ++++++++ 4 files changed, 10 insertions(+), 42 deletions(-) delete mode 100644 R/cvpr_article.R diff --git a/NAMESPACE b/NAMESPACE index 905a12c71..ba27a7a16 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -11,10 +11,10 @@ export(biometrics_article) export(copernicus_article) export(copernicus_journal_abbreviations) export(ctex) +export(cvpr_article) export(elsevier_article) export(frontiers_article) export(ieee_article) -export(cvpr_article) export(joss_article) export(jss_article) export(mdpi_article) diff --git a/R/article.R b/R/article.R index 8ff18ab50..545231297 100644 --- a/R/article.R +++ b/R/article.R @@ -132,6 +132,7 @@ cvpr_article <- function(keep_tex = TRUE) { pdf_document_format('cvpr', keep_tex=keep_tex, ...) } + #' @section \code{elsevier_article}: Format for creating submissions to Elsevier #' journals. Adapted from #' \url{https://www.elsevier.com/authors/author-schemas/latex-instructions}. diff --git a/R/cvpr_article.R b/R/cvpr_article.R deleted file mode 100644 index 389075150..000000000 --- a/R/cvpr_article.R +++ /dev/null @@ -1,41 +0,0 @@ -#' CVPR conference format. -#' @inheritParams rmarkdown::pdf_document -#' @param draftmode Specify the draft mode to control spacing and whether images -#' should be rendered. Valid options are: \code{"final"} (default), \code{"draft"}, -#' \code{"draftcls"}, or \code{"draftclsnofoot"}. -#' @param hyphenfixes A \code{character} value that provides the correct -#' hyphenations for ambiguous words. Separate new words with spaces. -#' @param ... Additional arguments to \code{rmarkdown::pdf_document} -#' -#' @references -#' \url{cvpr2020.thecvf.com/sites/default/files/2019-09/cvpr2020AuthorKit.tar} -#' @export -cvpr_article <- function( - draftmode = c("final", "draft", "draftcls", "draftclsnofoot"), - hyphenfixes = "op-tical net-works semi-conduc-tor", - keep_tex = TRUE, - pandoc_args = NULL, - md_extensions = c("-autolink_bare_uris"), - ... -) { - - args <- c() - - draftmode <- match.arg(draftmode) - args <- c(args, "draftmode" = draftmode) - args <- c(args, "hyphenfixes" = hyphenfixes) - - # pandoc_variable_arg not exported from rmarkdown - pandoc_arg_variable <- function(var_name, value) { - c("-V", paste0(var_name, "=", value)) - } - - # Convert to pandoc arguments - pandoc_arg_list <- mapply(pandoc_arg_variable, names(args), args) - - pdf_document_format( - "cvpr_article", pandoc_args = c(pandoc_arg_list, pandoc_args), - keep_tex = keep_tex, md_extensions = md_extensions, - ... - ) -} diff --git a/man/article.Rd b/man/article.Rd index 8dafbb8f2..012491e1e 100644 --- a/man/article.Rd +++ b/man/article.Rd @@ -10,6 +10,7 @@ \alias{asa_article} \alias{biometrics_article} \alias{ctex} +\alias{cvpr_article} \alias{elsevier_article} \alias{frontiers_article} \alias{mdpi_article} @@ -59,6 +60,8 @@ biometrics_article(..., keep_tex = TRUE, citation_package = "natbib") ctex(..., latex_engine = "xelatex") +cvpr_article(keep_tex = TRUE) + elsevier_article( ..., keep_tex = TRUE, @@ -159,6 +162,11 @@ custom Pandoc LaTeX template and different default values for other arguments with the \pkg{ctex} LaTeX package. } +\section{\code{cvpr_article}}{ + Format for creating submissions to the CVPR conference. +Adapted from \url{http://cvpr2020.thecvf.com/submission/main-conference/author-guidelines#submission-guidelines}. +} + \section{\code{elsevier_article}}{ Format for creating submissions to Elsevier journals. Adapted from From 8ba16ce551597b53db75b205c1fed5b7da0818f3 Mon Sep 17 00:00:00 2001 From: Duncan Luguern Date: Sun, 8 Mar 2020 22:11:41 +0100 Subject: [PATCH 04/11] Bibliography correction --- .../templates/cvpr_article/skeleton/egbib.bib | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/inst/rmarkdown/templates/cvpr_article/skeleton/egbib.bib b/inst/rmarkdown/templates/cvpr_article/skeleton/egbib.bib index 0bc0c4ffb..d3ce854c9 100644 --- a/inst/rmarkdown/templates/cvpr_article/skeleton/egbib.bib +++ b/inst/rmarkdown/templates/cvpr_article/skeleton/egbib.bib @@ -6,9 +6,12 @@ @misc{Authors14 year = 2014 } -@misc{Authors14b, - author = {Authors}, - title = {Frobnication tutorial}, - note = {Supplied as additional material {\tt tr.pdf}}, - year = 2014 +@article{Alpher02, +author = {FirstName Alpher}, +title = {Frobnication}, +journal = {Journal of Foo}, +volume = 12, +number = 1, +pages = {234--778}, +year = 2002 } From b8ccb83ff9dc0da3d93b3662236877fb4cecee6a Mon Sep 17 00:00:00 2001 From: Duncan Luguern Date: Sun, 8 Mar 2020 22:14:49 +0100 Subject: [PATCH 05/11] Update NEWS.md and README.md --- NEWS.md | 2 +- README.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index a3d8f0e71..5afc4d6eb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ rticles 0.15 --------------------------------------------------------------------- - +- Added cvpr_article() document class rticles 0.14 --------------------------------------------------------------------- diff --git a/README.md b/README.md index c7a321e1b..67c0b13dd 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,8 @@ The **rticles** package provides a suite of custom [R Markdown](http://rmarkdown - [CTeX](https://ctan.org/pkg/ctex) documents +- [CVPR](http://cvpr2020.thecvf.com/submission/main-conference/author-guidelines#submission-guidelines) conference submissions + - [Elsevier](https://www.elsevier.com) journal submissions - [IEEE Transaction](http://www.ieee.org/publications_standards/publications/authors/author_templates.html) journal submissions From 6953fbaceb86f0c6eca9d57186880df7a5d7ccdf Mon Sep 17 00:00:00 2001 From: Duncan Luguern Date: Fri, 13 Mar 2020 09:22:22 +0100 Subject: [PATCH 06/11] Fix bug in cvpr_article function --- R/article.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/article.R b/R/article.R index 545231297..169268662 100644 --- a/R/article.R +++ b/R/article.R @@ -128,9 +128,9 @@ ctex <- function(..., latex_engine = 'xelatex') { #' Adapted from \url{http://cvpr2020.thecvf.com/submission/main-conference/author-guidelines#submission-guidelines}. #' @export #' @rdname article -cvpr_article <- function(keep_tex = TRUE) +cvpr_article <- function(keep_tex = TRUE, ...) { - pdf_document_format('cvpr', keep_tex=keep_tex, ...) + pdf_document_format('cvpr_article', keep_tex=keep_tex, ...) } #' @section \code{elsevier_article}: Format for creating submissions to Elsevier From 028dfb54b1356d0bd4c4a2e20663a2638171c910 Mon Sep 17 00:00:00 2001 From: Duncan Luguern Date: Fri, 13 Mar 2020 09:23:08 +0100 Subject: [PATCH 07/11] Remove last paragraph line in author header --- .../templates/cvpr_article/resources/template.tex | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/inst/rmarkdown/templates/cvpr_article/resources/template.tex b/inst/rmarkdown/templates/cvpr_article/resources/template.tex index 200690f4c..f9c288ed4 100644 --- a/inst/rmarkdown/templates/cvpr_article/resources/template.tex +++ b/inst/rmarkdown/templates/cvpr_article/resources/template.tex @@ -44,13 +44,14 @@ $affiliation.author.name$\\ $endfor$ $affiliation.institution.name$ \\ -$affiliation.institution.address$ \\ +$affiliation.institution.address$ $for(affiliation.author)$ -{\tt\small $affiliation.author.mail$} -$sep$\\ +$if(affiliation.author.mail)$ +\\{\tt\small $affiliation.author.mail$} +$endif$ $endfor$ $if(affiliation.institution.mail)$ -{\tt\small $affiliation.institution.mail$} +\\{\tt\small $affiliation.institution.mail$} $endif$ $sep$\and $endfor$ From fc829e8e0d0e6605bd43aad173257438c2972a27 Mon Sep 17 00:00:00 2001 From: Duncan Luguern Date: Fri, 13 Mar 2020 09:24:12 +0100 Subject: [PATCH 08/11] Add a subsubsection style, 10 point font size, dot at end of title and text without separation with text --- inst/rmarkdown/templates/cvpr_article/skeleton/cvpr.sty | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/inst/rmarkdown/templates/cvpr_article/skeleton/cvpr.sty b/inst/rmarkdown/templates/cvpr_article/skeleton/cvpr.sty index e80878dbd..ef99e7775 100644 --- a/inst/rmarkdown/templates/cvpr_article/skeleton/cvpr.sty +++ b/inst/rmarkdown/templates/cvpr_article/skeleton/cvpr.sty @@ -50,6 +50,7 @@ % change the name here: \font\cvprtenhv = phvb at 8pt % *** IF THIS FAILS, SEE cvpr.sty *** \font\elvbf = ptmb scaled 1100 +\font\tenvbf = ptmb scaled 1000 % If the above lines give an error message, try to comment them and % uncomment these: @@ -154,6 +155,12 @@ Paper ID \cvprPaperID \fi \def\cvprsubsect#1{\cvprsubsection{\hskip -1em.~#1}} \def\subsection{\@ifstar\cvprssubsect\cvprsubsect} +\def\cvprsubsubsection{\@startsection {subsubsection}{3}{\z@} + {8pt plus 2pt minus 2pt}{-6pt} {\tenvbf}} +\def\cvprssubsubsect#1{\cvprsubsubsection*{#1.}} +\def\cvprsubsubsect#1{\cvprsubsubsection{\hskip -1em.~#1.}} +\def\subsubsection{\@ifstar\cvprssubsubsect\cvprsubsubsect} + %% --------- Page background marks: Ruler and confidentiality % ----- define vruler From dd758fe50d278d58255a947256cbcac76bf52768 Mon Sep 17 00:00:00 2001 From: Duncan Luguern Date: Fri, 13 Mar 2020 09:25:33 +0100 Subject: [PATCH 09/11] The counter should be set if first_page is defined and finalcopy is true. the empty pagestyle command is added in any other cases --- inst/rmarkdown/templates/cvpr_article/resources/template.tex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inst/rmarkdown/templates/cvpr_article/resources/template.tex b/inst/rmarkdown/templates/cvpr_article/resources/template.tex index f9c288ed4..c20309e91 100644 --- a/inst/rmarkdown/templates/cvpr_article/resources/template.tex +++ b/inst/rmarkdown/templates/cvpr_article/resources/template.tex @@ -28,10 +28,14 @@ % Pages are numbered in submission mode, and unnumbered in camera-ready $if(first_page)$ +$if(finalcopy)$ \setcounter{page}{$first_page$} $else$ \ifcvprfinal\pagestyle{empty}\fi $endif$ +$else$ +\ifcvprfinal\pagestyle{empty}\fi +$endif$ \begin{document} %%%%%%%%% TITLE From 4da96c835eb1a9e76b453ae51242d9ee4ba1316d Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Mon, 29 Nov 2021 16:39:38 +0100 Subject: [PATCH 10/11] rename folder as expected from now on --- .../templates/{cvpr_article => cvpr}/resources/template.tex | 0 inst/rmarkdown/templates/{cvpr_article => cvpr}/skeleton/cvpr.sty | 0 .../templates/{cvpr_article => cvpr}/skeleton/cvpr_eso.sty | 0 .../rmarkdown/templates/{cvpr_article => cvpr}/skeleton/egbib.bib | 0 .../templates/{cvpr_article => cvpr}/skeleton/eso-pic.sty | 0 .../templates/{cvpr_article => cvpr}/skeleton/ieee_fullname.bst | 0 .../templates/{cvpr_article => cvpr}/skeleton/skeleton.Rmd | 0 inst/rmarkdown/templates/{cvpr_article => cvpr}/template.yaml | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename inst/rmarkdown/templates/{cvpr_article => cvpr}/resources/template.tex (100%) rename inst/rmarkdown/templates/{cvpr_article => cvpr}/skeleton/cvpr.sty (100%) rename inst/rmarkdown/templates/{cvpr_article => cvpr}/skeleton/cvpr_eso.sty (100%) rename inst/rmarkdown/templates/{cvpr_article => cvpr}/skeleton/egbib.bib (100%) rename inst/rmarkdown/templates/{cvpr_article => cvpr}/skeleton/eso-pic.sty (100%) rename inst/rmarkdown/templates/{cvpr_article => cvpr}/skeleton/ieee_fullname.bst (100%) rename inst/rmarkdown/templates/{cvpr_article => cvpr}/skeleton/skeleton.Rmd (100%) rename inst/rmarkdown/templates/{cvpr_article => cvpr}/template.yaml (100%) diff --git a/inst/rmarkdown/templates/cvpr_article/resources/template.tex b/inst/rmarkdown/templates/cvpr/resources/template.tex similarity index 100% rename from inst/rmarkdown/templates/cvpr_article/resources/template.tex rename to inst/rmarkdown/templates/cvpr/resources/template.tex diff --git a/inst/rmarkdown/templates/cvpr_article/skeleton/cvpr.sty b/inst/rmarkdown/templates/cvpr/skeleton/cvpr.sty similarity index 100% rename from inst/rmarkdown/templates/cvpr_article/skeleton/cvpr.sty rename to inst/rmarkdown/templates/cvpr/skeleton/cvpr.sty diff --git a/inst/rmarkdown/templates/cvpr_article/skeleton/cvpr_eso.sty b/inst/rmarkdown/templates/cvpr/skeleton/cvpr_eso.sty similarity index 100% rename from inst/rmarkdown/templates/cvpr_article/skeleton/cvpr_eso.sty rename to inst/rmarkdown/templates/cvpr/skeleton/cvpr_eso.sty diff --git a/inst/rmarkdown/templates/cvpr_article/skeleton/egbib.bib b/inst/rmarkdown/templates/cvpr/skeleton/egbib.bib similarity index 100% rename from inst/rmarkdown/templates/cvpr_article/skeleton/egbib.bib rename to inst/rmarkdown/templates/cvpr/skeleton/egbib.bib diff --git a/inst/rmarkdown/templates/cvpr_article/skeleton/eso-pic.sty b/inst/rmarkdown/templates/cvpr/skeleton/eso-pic.sty similarity index 100% rename from inst/rmarkdown/templates/cvpr_article/skeleton/eso-pic.sty rename to inst/rmarkdown/templates/cvpr/skeleton/eso-pic.sty diff --git a/inst/rmarkdown/templates/cvpr_article/skeleton/ieee_fullname.bst b/inst/rmarkdown/templates/cvpr/skeleton/ieee_fullname.bst similarity index 100% rename from inst/rmarkdown/templates/cvpr_article/skeleton/ieee_fullname.bst rename to inst/rmarkdown/templates/cvpr/skeleton/ieee_fullname.bst diff --git a/inst/rmarkdown/templates/cvpr_article/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/cvpr/skeleton/skeleton.Rmd similarity index 100% rename from inst/rmarkdown/templates/cvpr_article/skeleton/skeleton.Rmd rename to inst/rmarkdown/templates/cvpr/skeleton/skeleton.Rmd diff --git a/inst/rmarkdown/templates/cvpr_article/template.yaml b/inst/rmarkdown/templates/cvpr/template.yaml similarity index 100% rename from inst/rmarkdown/templates/cvpr_article/template.yaml rename to inst/rmarkdown/templates/cvpr/template.yaml From d973cec974db8752d0d37373b4ec9dbb03509d5f Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Mon, 29 Nov 2021 16:40:56 +0100 Subject: [PATCH 11/11] change in function too --- R/article.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/article.R b/R/article.R index e8054a4eb..230e4c4a4 100644 --- a/R/article.R +++ b/R/article.R @@ -156,7 +156,7 @@ ctex_article <- function(..., template = 'default', latex_engine = 'xelatex') { #' @rdname article cvpr_article <- function(keep_tex = TRUE, ...) { - pdf_document_format('cvpr_article', keep_tex=keep_tex, ...) + pdf_document_format('cvpr', keep_tex=keep_tex, ...) } #' @export