-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add first version of the CVPR rticle model #278
Draft
DunLug
wants to merge
12
commits into
rstudio:main
Choose a base branch
from
DunLug:CVPR_Template
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c9c1c37
Add first version of the CVPR rticle model
DunLug 374040d
Simplify the bibliography example and the cvpr_article function
DunLug ba080e5
Update documentation and remove cvpr_article.R file
DunLug 8ba16ce
Bibliography correction
DunLug b8ccb83
Update NEWS.md and README.md
DunLug 6953fba
Fix bug in cvpr_article function
DunLug 028dfb5
Remove last paragraph line in author header
DunLug fc829e8
Add a subsubsection style, 10 point font size, dot at end of title an…
DunLug dd758fe
The counter should be set if first_page is defined and finalcopy is t…
DunLug 7717e2e
Merge branch 'master' into DunLug-CVPR_Template
cderv 4da96c8
rename folder as expected from now on
cderv d973cec
change in function too
cderv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
inst/rmarkdown/templates/cvpr_article/resources/template.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
\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)$ | ||
$if(finalcopy)$ | ||
\setcounter{page}{$first_page$} | ||
$else$ | ||
\ifcvprfinal\pagestyle{empty}\fi | ||
$endif$ | ||
$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)$ | ||
$if(affiliation.author.mail)$ | ||
\\{\tt\small $affiliation.author.mail$} | ||
$endif$ | ||
$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} |
256 changes: 256 additions & 0 deletions
256
inst/rmarkdown/templates/cvpr_article/skeleton/cvpr.sty
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,256 @@ | ||
% --------------------------------------------------------------- | ||
% | ||
% $Id: cvpr.sty,v 1.3 2005/10/24 19:56:15 awf Exp $ | ||
% | ||
% by [email protected] | ||
% some mods by [email protected] | ||
% | ||
% --------------------------------------------------------------- | ||
% | ||
% 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 | ||
\font\tenvbf = ptmb scaled 1000 | ||
|
||
% 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} | ||
|
||
\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 | ||
\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[<WIDTH>]<NUMBER> | ||
\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[<SCALE>][<INITIAL_COUNT>][<STEP>][<DIGITS>][<HEIGHT>] | ||
\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[<SCALE>][<INITIAL_COUNT>][<STEP>][<DIGITS>][<HEIGHT>] | ||
\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 | ||
|
||
% --------------------------------------------------------------- |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.