summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/dccpaper/dccpaper-base.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/dccpaper/dccpaper-base.tex')
-rw-r--r--Master/texmf-dist/tex/latex/dccpaper/dccpaper-base.tex87
1 files changed, 69 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/dccpaper/dccpaper-base.tex b/Master/texmf-dist/tex/latex/dccpaper/dccpaper-base.tex
index 86b8537b341..eeefb6c6f88 100644
--- a/Master/texmf-dist/tex/latex/dccpaper/dccpaper-base.tex
+++ b/Master/texmf-dist/tex/latex/dccpaper/dccpaper-base.tex
@@ -14,7 +14,7 @@
%% See: http://www.latex-project.org/lppl.txt
%% ----------------------------------------------------------------
%%
-\def\Version{2014/04/11 v1.2}
+\def\Version{2014/08/07 v1.3}
\ProvidesFile{dccpaper-base.tex}
[\Version\space Common class code for IJDC and IDCC papers.]
%
@@ -135,6 +135,11 @@
%
\newcommand{\MainAuthor}{}
%
+% The |\dccp@author| command, meanwhile, collects a full list of authors for the
+% PDF metatdata.
+%
+\newcommand{\dccp@author}{}
+%
% We define counters for
% \begin{itemize}
% \item the total number of authors defined;
@@ -160,9 +165,13 @@
% abbreviated list of authors. Otherwise, we replace the name of the second
% and subsequent authors with `et al.' in that list.
%
+% At the same time, we use a simpler technique to populate |\dccp@author|.
+%
\ifnum\theauthors=0
+ \def\dccp@author{#1}%
\def\MainAuthor{#1}%
\else
+ \appto\dccp@author{, #1}%
\ifnum\theauthors=1%
\def\OtherMainAuthors{ and #1}%
\appto\MainAuthor{\OtherMainAuthors}%
@@ -343,12 +352,14 @@
\setlength\@tempdimb{\baselineskip}%
\multiply\@tempdimb\@tempcnta
\advance\@tempdima-\@tempdimb
+ \global\advance\footskip\@tempdima
\multiply\@tempdima\tw@
\ifdim\@tempdima>\baselineskip
\addtolength\@tempdimb{\baselineskip}%
+ \global\advance\footskip-\baselineskip
\fi
\addtolength\@tempdimb{\topskip}%
- \textheight\@tempdimb
+ \global\textheight\@tempdimb
}
%
@@ -360,6 +371,11 @@
\setlength{\oddsidemargin}{30mm - \hoffset - 1in}
\setlength{\evensidemargin}{30mm - \hoffset - 1in}
%
+% It is rare to have marginal notes, but in case we ever do, we centre them in
+% the margin.
+%
+\setlength{\marginparwidth}{30mm - 2\marginparsep}
+%
% We also want a distance of 15mm from the top of the page to the top of the
% header, and two blank lines between the bottom of the header and the top of
% the textblock.
@@ -504,7 +520,7 @@
\newsavebox{\dccp@firstpagehead}
\sbox\dccp@firstpagehead{\normalfont\TitleHead}
\newsavebox{\dccp@firstpagefoot}
- \sbox\dccp@firstpagehead{\normalfont
+ \sbox\dccp@firstpagefoot{\normalfont
\def\email#1{#1}\def\url#1{#1}\def\href#1#2{#2}\TitleFoot}
\newsavebox{\dccp@restpagehead}
\sbox\dccp@restpagehead{\normalfont\NormalHead}
@@ -523,7 +539,6 @@
- \headheight
- \headsep
- \footskip
- + \baselineskip
}
%
% {\dots}and provide a macro that will reset the geometry for the remaining
@@ -531,36 +546,40 @@
%
\def\dccp@resetgeometry{%
\setlength{\headheight}{\ht\dccp@restpagehead + \dp\dccp@restpagehead}
+ \global\headheight=\headheight
\setlength{\footskip}{%
- 2\baselineskip + \ht\dccp@firstpagefoot + \dp\dccp@firstpagefoot
+ 2\baselineskip + \ht\dccp@restpagefoot
}
+ \global\footskip=\footskip
\setlength{\textheight}{%
\paperheight
- 30mm % 15mm top and bottom
- \headheight
- \headsep
- \footskip
- + \baselineskip
}
\FixTextHeight
+ \global\textheight=\textheight
}
}
%
-% The |\maketitle| command is redefined to to correct formatting. At the end it
-% resets the geometry, but this only takes effect on the second page. It is here
-% rather than at the end of the abstract in case the abstract itself spills over
-% to the second page.
+% The |\maketitle| command is redefined to the correct formatting. At the end it
+% sets a hook that will reset the geometry when the first page is shipped out,
+% i.e.\ with effect from the second page. It is here rather than at the end of
+% the abstract in case the abstract itself spills over to the second page.
%
+\RequirePackage{atbegshi}
\renewcommand{\maketitle}{%
\null\nobreak\vspace*{-0.528\baselineskip}%
\begingroup
\centering
- { \Large\thetitle\par}
+ {\Large\thetitle\par}
\vspace{0.7\baselineskip}
\AuthorBlock\par
\vspace{1.7\baselineskip}
- \endgroup\dccp@resetgeometry
+ \endgroup
+ \AtBeginShipoutNext{\dccp@resetgeometry}%
}
%
@@ -695,12 +714,42 @@
]{caption}
%
-% Footnotes should be set right up against the left margin
+% Footnotes should be set right up against the left margin. They should be
+% set hung and in the same half-ragged style as the main text. They should also,
+% for neatness, be at the bottom of the page regardless of how short it is. The
+% \textsf{footmisc} package helps here.
+%
+\RequirePackage[hang,bottom]{footmisc}
+\settowidth{\footnotemargin}{\footnotesize\textsuperscript{99}\space}
+\renewcommand{\footnotelayout}{\raggedyright}
%
-\renewcommand\@makefntext[1]{%
- \parindent 1em%
- \noindent
- \@makefnmark~#1%
+% Also, if multiple footnotes are set at once, the markers should be separated
+% with superscript commas. The \textsf{footmisc} package should help here but
+% its solution is clobbered by \textsf{hyperref}. So after a footnote is set,
+% we check to see if the next token is also a footnote, and if so, slip a comma
+% in before it.\footnote{This solution was provided at
+% \url{http://tex.stackexchange.com/q/40072}} This tweak needs to be done late,
+% |\AtBeginDocument|. Note that the \textsf{newtx} superior figures are a bit
+% lower than normal superscript text.
+%
+\AtBeginDocument{
+ \let\dccp@footnote\footnote
+ \def\dccp@next@token{\relax}%
+ \def\dccp@supercomma{\textsuperscript{,}}%
+ \IfFileExists{newtxtext.sty}%
+ {\def\dccp@supercomma{\raisebox{-0.2ex}{\textsuperscript{,}}}}%
+ {}
+
+ \newcommand\dccp@check@for@footnote{%
+ \ifx\footnote\dccp@next@token
+ \dccp@supercomma
+ \fi
+ }
+
+ \renewcommand\footnote[1]{%
+ \dccp@footnote{#1}%
+ \futurelet\dccp@next@token\dccp@check@for@footnote
+ }
}
%
@@ -708,6 +757,8 @@
%
\topsep = \z@
\partopsep = \z@
+\appto{\enumerate}{\itemsep = 0.5ex plus 0.25ex minus 0.25ex}
+\appto{\itemize}{\itemsep = 0.5ex plus 0.25ex minus 0.25ex}
%
% A DCC paper should either be using \textsf{biblatex} or \textsf{apacite} for
@@ -873,7 +924,7 @@
\AtBeginDocument{%
\hypersetup
{ pdftitle={\thetitle}
- , pdfauthor={\MainAuthor}
+ , pdfauthor={\dccp@author}
, pdfsubject={\dccp@subject}
}
%