summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/dccpaper/dccpaper.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-04-23 21:37:27 +0000
committerKarl Berry <karl@freefriends.org>2014-04-23 21:37:27 +0000
commit1421f3557eb7d3fbb2baea644579434d290bb587 (patch)
tree320ed76d21a216737e5608d1bfc983f26702a4e7 /Master/texmf-dist/source/latex/dccpaper/dccpaper.dtx
parent79890bb9b6bae4d32a5e2c75b9a20cf4aca8084e (diff)
dccpaper (23apr14)
git-svn-id: svn://tug.org/texlive/trunk@33643 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/dccpaper/dccpaper.dtx')
-rw-r--r--Master/texmf-dist/source/latex/dccpaper/dccpaper.dtx711
1 files changed, 520 insertions, 191 deletions
diff --git a/Master/texmf-dist/source/latex/dccpaper/dccpaper.dtx b/Master/texmf-dist/source/latex/dccpaper/dccpaper.dtx
index 00eb469f1af..9776ea65b7e 100644
--- a/Master/texmf-dist/source/latex/dccpaper/dccpaper.dtx
+++ b/Master/texmf-dist/source/latex/dccpaper/dccpaper.dtx
@@ -1,38 +1,105 @@
% \iffalse meta-comment
%<*internal>
-\def\Version{2014/03/06 v1.1}
+\def\Version{2014/04/11 v1.2}
\iffalse
%</internal>
-%<ijdc9|idcc|base>\def\Version{2014/03/06 v1.1}
+%<ijdc9|idcc|base>\def\Version{2014/04/11 v1.2}
%<*readme>
-----------------------------------------------------------------
-The dccpaper bundle: Classes for submissions to IJDC and IDCC
-Author: Alex Ball
-E-mail: a.ball@ukoln.ac.uk
-License: Released under the LaTeX Project Public License v1.3c or later
-See: http://www.latex-project.org/lppl.txt
-----------------------------------------------------------------
+The dccpaper bundle: LaTeX classes for submissions to IJDC and IDCC
+===================================================================
The dccpaper bundle consists of two very similar classes.
-ijdc-v9.cls corresponds to the template used by the International Journal of
-Digital Curation, beginning with volume 9.
+ijdc-v9.cls corresponds to the template used by the `International
+Journal of Digital Curation`_, beginning with volume 9.
+
+idcc.cls corresponds to the template used for the `International Digital
+Curation Conference`_, beginning with IDCC15.
+
+As the classes are so similar, their common features are abstracted out
+into dccpaper-base.tex, which should be installed in the runtime tex
+directory, rather than with the documentation.
+
+The classes are suitable for submissions to the respective review
+boards, but can also be used to produce the final camera-ready papers.
+
+Installation
+------------
+
+Managed way
+~~~~~~~~~~~
+
+The latest stable release of the dccpaper bundle has been packaged for
+TeX Live and MiKTeX. If you are running TeX Live and have ``tlmgr``
+installed, you can install the bundle simply by running
+``tlmgr install dccpaper``. If you are running MiKTeX, you can install
+the bundle by running ``mpm --install=dccpaper``. Both ``tlmgr`` and
+``mpm`` have GUI versions that you might find friendlier.
-idcc.cls corresponds to the template used for the International Digital Curation
-Conference, beginning with IDCC15.
+Automated way
+~~~~~~~~~~~~~
-As the classes are so similar, their common features are abstracted out into
-dccpaper-base.tex, which should be installed in the runtime tex directory,
-rather than with the documentation.
+A makefile is provided which you can use with the Make utility:
-The classes are suitable for submissions to the respective review boards, but
-can also be used to produce the final camera-ready papers.
+- Running ``make`` generates the derived files
-Please note that the image files distributed with this package, dccpaper-by.eps
-and dccpaper-by.pdf, are trademarks of Creative Commons and are subject to
-the Creative Commons trademark policy:
-http://creativecommons.org/policies
+ - README
+ - dccpaper.pdf
+ - ijdc-v9.cls
+ - idcc.cls
+ - dccpaper-base.tex
+ - dccpaper-apacite.bib
+ - dccpaper-biblatex.bib
+- Running ``make inst`` installs the files in the user's TeX tree.
+- Running ``make install`` installs the files in the local TeX tree.
+
+Manual way
+~~~~~~~~~~
+
+1. Compile dccpaper.dtx just as you would a normal LaTeX file. Bear in
+ mind the documentation requires the Biblatex package and the Biber
+ tool rather than regular BibTeX. As well as the usual PDF (or DVI)
+ and auxiliary files, several others are generated.
+2. Rename README.txt to README (if you like).
+3. Move the files to your TeX tree as follows:
+
+ - ``source/latex/dccpaper``: dccpaper.dtx, dccpaper.ins
+ - ``tex/latex/dccpaper``: ijdc-v9.cls, idcc.cls, dccpaper-base.tex,
+ dccpaper-by.eps, dccpaper-by.pdf
+ - ``doc/latex/dccpaper``: dccpaper.pdf, dccpaper-apacite.bib,
+ dccpaper-biblatex.bib, README
+
+4. You may then have to update your installation's file name database
+ before TeX and friends can see the files.
+
+Licence
+-------
+
+Copyright 2014 Digital Curation Centre, University of Edinburgh.
+
+This work consists of the image files dccpaper-by.eps and
+dccpaper-by.pdf, the documented LaTeX file dccpaper.dtx and a Makefile.
+
+The text files contained in this work may be distributed and/or modified
+under the conditions of the `LaTeX Project Public License (LPPL)`_,
+either version 1.3c of this license or (at your option) any later
+version.
+
+The image files distributed with this bundle derive from the file
+`by.eps`_ distributed by Creative Commons. The image is a trademark of
+Creative Commons and is subject to the `Creative Commons trademark
+policy`_.
+
+This work is "maintained" (as per LPPL maintenance status) by `Alex
+Ball`_.
+
+.. _International Journal of Digital Curation: http://www.ijdc.net/index.php/ijdc
+.. _International Digital Curation Conference: http://www.dcc.ac.uk/events/international-digital-curation-conference-idcc
+.. _LaTeX Project Public License (LPPL): http://www.latex-project.org/lppl.txt
+.. _by.eps: http://mirrors.creativecommons.org/presskit/buttons/88x31/eps/by.eps
+.. _Creative Commons trademark policy: http://creativecommons.org/policies
+.. _Alex Ball: http://alexball.me.uk/
%</readme>
%<ijdc9|idcc>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<ijdc9>\ProvidesClass{ijdc-v9}
@@ -48,19 +115,20 @@ http://creativecommons.org/policies
[\Version\space Common class code for IJDC and IDCC papers.]
%</base>
%<*ijdc9>
+%<<LITERATE
%
% The type of paper is recorded in |\dccp@type|. The possible values are
% `General Article', `Peer-Reviewed Paper', or `Editorial'.
% The latter is provided through the constant |\dccp@editorial| so we can
% test for it later with ease.
-%
+%
\def\dccp@type{General Article}
\def\dccp@editorial{Editorial}
%
-% These three options set \dccp@type appropriately. The |editorial|
+% These three options set |\dccp@type| appropriately. The |editorial|
% option additionally switches page numbers to roman numerals.
% The |article| option is redundant, but included for symmetry.
-%
+%
\DeclareOption{editorial}{\let\dccp@type=\dccp@editorial%
\AtBeginDocument{% Editorials use Roman numerals for page numbers
\pagenumbering{roman}%
@@ -75,7 +143,7 @@ http://creativecommons.org/policies
% These definitions are used to fill out the headers and footers. They include
% some details that are defined in \textsf{dccpaper-base.tex} and provided by
% the user: |\thedate|, |\thevolume|, |\theissue|, |\thelastpage|, |\thedoi|.
-%
+%
\def\dccp@publ@long{International Journal of Digital Curation}
\def\dccp@publ@short{IJDC}
\def\dccp@publ@msg{The \emph{\dccp@publ@long} is an international journal
@@ -95,20 +163,22 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
%
% |\dccp@subject| will be used for the PDF subject, and will specify the journal
% and the issue.
-%
+%
\def\dccp@subject{\dccp@publ@long, \thedate, Vol.\ \thevolume, Iss.\ \theissue}
%
% The rest of the formatting happens in the following file.
%
\input{dccpaper-base}
+%LITERATE
%</ijdc9>
%<*idcc>
+%<<LITERATE
%
% These definitions are used to fill out the headers and footers.
% The ones for |\dccp@publ@short| and |\dccp@publ@msg| are a fallback,
% defined here but ordinarily overridden using a package option.
-%
+%
\def\dccp@publ@long{International Digital Curation Conference}
\def\dccp@publ@short{IDCC}
\def\dccp@publ@msg{The \dccp@publ@long\ takes place on [TBC] in [TBC]. URL:
@@ -116,18 +186,18 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
%
% |\dccp@subject| will be used for the PDF subject. The value here is again a
% fallback, ordinarily overridden using a package option.
-%
+%
\def\dccp@subject{\dccp@publ@long}
%
% Paper type is recorded in |\def\dccp@type|. The values can be
% `Research Paper', `Practice Paper', `Poster', `Demonstration', or `Workshop'.
-%
+%
\def\dccp@type{Practice Paper}
%
% These options set the value of |\def\dccp@type| appropriately.
% The |practice| option is redundant, but included for symmetry.
-%
+%
\DeclareOption{research}{\def\dccp@type{Research Paper}}
\DeclareOption{poster}{\def\dccp@type{Poster}}
\DeclareOption{demo}{\def\dccp@type{Demonstration}}
@@ -137,7 +207,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
% The details for each conference are slightly different, so they each have an
% associated option for overriding the fallback definitions for
% |\dccp@publ@short|, |\dccp@publ@msg| and |\dccp@subject|.
-%
+%
\DeclareOption{15}{%
\def\dccp@publ@short{IDCC15}
\def\dccp@publ@msg{The 10th \dccp@publ@long\ takes place on [TBC] in [TBC].
@@ -150,18 +220,20 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
% The rest of the formatting happens in the following file.
%
\input{dccpaper-base}
+%LITERATE
%</idcc>
%<*base>
+%<<LITERATE
%
% The \textsf{dccpaper} classes are deliberately very similar. This file
% contains the common code. All the classes are based on the \textsf{article}
% class, and use A4 paper.
-%
+%
\LoadClass[a4paper,12pt,twoside]{article}
%
% We use British English orthography.
-%
+%
\RequirePackage[british]{babel}
%
% The macro patching commands from \textsf{etoolbox} come in useful for handling
@@ -201,7 +273,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
% Ragged right text is easier to read on screen, but fully justified text looks
% better. The |\raggedyright| layout from Peter Wilson's \textsf{memoir} class
% (2005/09/25 v1.618) is an excellent compromise. The code below replicates it.
-%
+%
% First we save the original definitions of |\\| and |\parindent| as
% |\OrigLineBreak| and |\RaggedParindent| respectively.
%
@@ -213,7 +285,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
% The |\raggedyright| layout more or less lays text out as with full
% justification, but then lets the shorter lines relax a bit from the right
% margin. It is the default for DCC papers.
-%
+%
\newcommand{\raggedyright}[1][2em]{%
\let\\\@centercr\@rightskip \z@ \@plus #1\relax
\rightskip\@rightskip
@@ -222,8 +294,9 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
\AtBeginDocument{\raggedyright}
%
-% The |\flushleftright| layout restores full justification.
-%
+% The |\flushleftright| layout restores full justification, in case it is
+% needed.
+%
\newcommand*{\flushleftright}{%
\let\\\OrigLineBreak
\leftskip\z@skip
@@ -244,7 +317,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
% The handling of authors here is inspired by Patrick W Daly's \textsf{authblk},
% (2001/02/27 1.3), and defines the familiar user commands. Authors are
% presented in blocks, one affiliation but perhaps several authors per block.
-%
+%
% We make the presentation of the author information configurable (just in case)
% with some hooks and lengths:
% \begin{itemize}
@@ -261,12 +334,12 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
\newlength{\authblksep}\setlength{\authblksep}{1.5\baselineskip}
%
% The |\AuthorBlock| command will be used to collect all the author information.
-%
+%
\newcommand{\AuthorBlock}{}
%
% The |\MainAuthor| command collects abbreviated author information for use in
% the headers.
-%
+%
\newcommand{\MainAuthor}{}
%
% We define counters for
@@ -275,15 +348,15 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
% \item the number of authors in the current block;
% \item the number of blocks defined.
% \end{itemize}
-%
+%
\newcounter{authors}
\newcounter{authorsinblock}
\newcounter{block}
%
% The |block| counter will increase once in the preamble, and again when the
-% the information is typeset, so we need to reset it at the beginning of the
+% information is typeset, so we need to reset it at the beginning of the
% document.
-%
+%
\AtBeginDocument{\setcounter{block}{0}}
%
% The new definition of the author command starts here.
@@ -309,8 +382,9 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
\stepcounter{authors}%
%
% Each block has its author names collected in a macro like |\blocki@auth|,
-% and its affiliation collected in a macro like |\blocki@affil|.
-%
+% and its affiliation collected in a macro like |\blocki@affil| (the `i' is a
+% serial number).
+%
% If this is the first author in a block, we need to create the block and add it
% to |\AuthorBlock|; second and subsequent blocks are preceded by a |\quad| of
% space.
@@ -374,7 +448,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
%
% We make |\thedate| persistent, borrowing the technique used in Peter Wilson's
% \textsf{memoir} class (2005/09/25 v1.618).
-%
+%
\pretocmd{\date}{\begingroup\let\footnote\@gobble}{}{}%
\apptocmd{\date}{%
\begingroup
@@ -392,9 +466,10 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
% \begin{itemize}
% \item |\volume| sets the volume number, |\thevolume|;
% \item |\issue| sets the issue number, |\theissue|;
-% \item |\subno| sets the submission number, |\thesubno|;
-% \item these are used to build the DOI, |\thedoi|;
+% \item |\subno| sets the submission number, |\thesubno|.
% \end{itemize}
+%
+% These numbers are used to build the DOI, |\thedoi|.
%
\newcommand*{\thevolume}{0}
\newcommand*{\volume}[1]{\renewcommand*{\thevolume}{#1}}
@@ -407,7 +482,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
% They also display the page range. The following code was borrowed from Peter
% Wilson's \textsf{memoir} class (2005/09/25 v1.618). It defines a counter
% |lastpage| which, on the second run, will contain the number of the last page.
-%
+%
\newcounter{lastpage}
\setcounter{lastpage}{0}
\newcommand{\dol@stpage}{%
@@ -423,8 +498,8 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
%
% DCC papers display some important dates. We collect these in |\dccp@dates|,
% initially setting the value to something sensible for papers in draft.
-%
-\def\dccp@dates{Draft from \today}
+%
+\def\dccp@dates{\emph{Draft from} \today}
%
% Several types of date can be added:
% \begin{itemize}
@@ -436,15 +511,21 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
% editorial board.
% \item |\accepted| for when the paper was accepted by the editorial board.
% \end{itemize}
-%
+%
\newcommand*{\submitted}[1]{%
\def\dccp@dates{\emph{Submitted} #1}}
\newcommand*{\received}[1]{%
\def\dccp@dates{\emph{Received} #1}}
\newcommand*{\revised}[1]{%
- \appto\dccp@dates{\space\space\space\textbar\space\space\space\emph{Revision received} #1}}
+ \appto\dccp@dates{%
+ \space\space\space\textbar\space\space\space
+ \emph{Revision received} #1}%
+ }
\newcommand*{\accepted}[1]{%
- \appto\dccp@dates{\space\space\space\textbar\space\space\space\emph{Accepted} #1}}
+ \appto\dccp@dates{%
+ \space\space\space\textbar\space\space\space
+ \emph{Accepted} #1}%
+ }
%
% IJDC papers need to say if they had a previous life as a conference paper.
% This statement goes in |\dccp@conf|, which is initially empty. The user
@@ -456,11 +537,12 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
}
%
-% This macro will be useful when switching from the first page geometry to the
-% regular geometry for the rest of the paper. It is based on code from Hideo
-% Umeki's \textsf{geometry} package (2002/07/08 v3.2).
-%
-\newcommand{\FixTextHeight}{\setlength\@tempdima{\textheight}%
+% The macro |\FixTextHeight| will be useful when switching from the first page
+% geometry to the regular geometry for the rest of the paper. It is based on
+% code from Hideo Umeki's \textsf{geometry} package (2002/07/08 v3.2).
+%
+\newcommand{\FixTextHeight}{%
+ \setlength\@tempdima{\textheight}%
\addtolength\@tempdima{-\topskip}%
\@tempcnta\@tempdima
\@tempcntb\baselineskip
@@ -473,7 +555,8 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
\addtolength\@tempdimb{\baselineskip}%
\fi
\addtolength\@tempdimb{\topskip}%
- \textheight\@tempdimb}
+ \textheight\@tempdimb
+}
%
% The width of the textblock (on all pages) is 150mm, which on A4 paper implies
@@ -494,7 +577,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
%
% IJDC editorials have slightly different headers and footers. This requires
% testing for |\dccp@editorial| if it exists. In case it doesn't, we provide it.
-%
+%
\providecommand{\dccp@editorial}{Editorial}
%
% The height of the footer can vary a lot. To keep it a fixed distance from the
@@ -505,7 +588,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
% Here we define the header and footer of the title page (i.e.\ the
% \textsf{title} page style), making sure we save them to auxiliary macros
% |\TitleHead| and |\TitleFoot| so we can measure them.
-%
+%
\def\ps@title{%
\def\@oddhead{%
\begin{minipage}{\textwidth}%
@@ -539,10 +622,13 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
\dccp@publ@msg\par
\bigskip
\begin{minipage}[b]{\linewidth - 25mm}
- Copyright rests with the authors. This work is released under a Creative Commons Attribution 4.0 International Licence. For details please see \url{http://creativecommons.org/licenses/by/4.0/}%
+ Copyright rests with the authors. This work is released under a Creative
+ Commons Attribution 4.0 International Licence. For details please see
+ \url{http://creativecommons.org/licenses/by/4.0/}%
\end{minipage}\hfill
\begin{minipage}[b]{19mm}
- \href{http://creativecommons.org/licenses/by/4.0/}{\includegraphics[width=\hsize]{dccpaper-by}}%
+ \href{http://creativecommons.org/licenses/by/4.0/}%
+ {\includegraphics[width=\hsize]{dccpaper-by}}%
\end{minipage}
\par
\bigskip
@@ -566,7 +652,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
\pagestyle{title}
%
% The first page should use the \textsf{title} page style, however.
-%
+%
\AtBeginDocument{\thispagestyle{title}}
%
@@ -577,15 +663,25 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
\def\ps@dccpaper{%
\def\@oddhead{%
\begin{minipage}{\textwidth}\frenchspacing
- {\fontsize{9pt}{11pt}\selectfont\ifx\undefined\dccp@normhead@doi\else\dccp@normhead@doi\fi}\hfill
- {\MainAuthor}\space\space\space\textcolor{struct}{\textbar}\space\space\space\thepage\par
+ {%
+ \fontsize{9pt}{11pt}\selectfont
+ \ifx\undefined\dccp@normhead@doi\else\dccp@normhead@doi\fi
+ }\hfill
+ {\MainAuthor}\space\space\space
+ \textcolor{struct}{\textbar}\space\space\space
+ \thepage\par
\vskip6pt\color{struct}{\hrule height 1bp}\par
\end{minipage}
}%
\def\@evenhead{%
\begin{minipage}{\textwidth}
- \thepage\space\space\space\textcolor{struct}{\textbar}\space\space\space{\HeadTitle}\hfill
- {\fontsize{9pt}{11pt}\selectfont\ifx\undefined\dccp@normhead@doi\else\dccp@normhead@doi\fi}\par
+ \thepage\space\space\space
+ \textcolor{struct}{\textbar}\space\space\space
+ {\HeadTitle}\hfill
+ {%
+ \fontsize{9pt}{11pt}\selectfont
+ \ifx\undefined\dccp@normhead@doi\else\dccp@normhead@doi\fi
+ }\par
\vskip6pt\color{struct}{\hrule height 1bp}\par
\end{minipage}
}%
@@ -637,7 +733,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
+ \baselineskip
}
%
-% \dots\ and provide a macro that will reset the geometry for the remaining
+% {\dots}and provide a macro that will reset the geometry for the remaining
% pages.
%
\def\dccp@resetgeometry{%
@@ -706,7 +802,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
% of normal lines (an attempt at grid typesetting). They are a little
% complicated because we want it to work even if the heading appears at the top
% of the page.
-%
+%
\RequirePackage{titlesec}
\titlespacing*{\section}{0pt}{0pt}{\baselineskip}
\titlespacing*{\subsection}{0pt}{0pt}{0.6\baselineskip}
@@ -717,9 +813,9 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
% An unfortunate side effect of spacing headings like this is that if a
% |\subsection| immediately follows a |\section| it forms an unsightly gap. To
% remedy this, we count how many paragraphs there have been since the last
-% |\section|. Note that as we are not numbering the sections, an automatic
+% |\section|. Note that as we do not normally number the sections, an automatic
% reset of the |sectionpars| counter within the |section| counter won't work.
-%
+%
\newcounter{sectionpars}
\let\dccp@old@ep\everypar
\newtoks\everypar
@@ -730,7 +826,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
% so the |\Large| line height = 1.5172 $\times$ normal line height. Nevertheless
% it seems to work better if we let the heading eat 0.528|\baselineskip| into
% the 2|\baselineskip| of padding above it.
-%
+%
\titleformat{\section}
[block]
{%
@@ -748,7 +844,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
% for |\subsection| command includes conditional spacing: if the |sectionpars|
% counter equals 2, this means the heading immediately follows a |\section|, so
% less white space is needed.
-%
+%
\titleformat{\subsection}
{%
\ifnum\thesectionpars>2%
@@ -782,7 +878,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
{}
%
% DCC papers do not typically number their sections.
-%
+%
\setcounter{secnumdepth}{0}
%
@@ -816,7 +912,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
%
% By default lists are quite loose. These settings help to tighten them.
-%
+%
\topsep = \z@
\partopsep = \z@
@@ -824,25 +920,116 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
% A DCC paper should either be using \textsf{biblatex} or \textsf{apacite} for
% references.
%
+% If \textsf{biblatex} is used, we need to ensure that the reference list
+% heading is a normal section rather than a starred one so it appears in the
+% PDF bookmarks.
+%
\AtBeginDocument{
\@ifpackageloaded{biblatex}{%
-%
-% If \textsf{biblatex} is used, we need to ensure that the references are a
-% normal section rather than an starred one so that they appear in the
-% PDF bookmarks.
-%
\defbibheading{bibliography}[\refname]{\section{#1}}%
}{%
+%
+% If \textsf{apacite} is used, we can do the same with a package option (see
+% below). But there are a few other adaptations we need to make.
+%
\@ifpackageloaded{apacite}{%
%
-% If \textsf{apacite} is used, we need to set the URL style to normal roman text
-% (not monospaced): as \textsf{apacite} sets this with |\AtBeginDocument|, we
-% have to reset it after that, |\AfterEndPreamble|. We also pre-empt
-% \textsf{apacite}'s |\providecommand| of |\doi| with our own definition that
-% includes the `doi' URI scheme label in the link, remembering to remove the
-% one inserted by |\doiprefix|.
+% With \textsf{hyperref} loaded, \textsf{apacite} makes the whole of a citation
+% a link to the reference list item. We patch |\@ifauthorsunequalc@de| so only
+% the year portion gets linked.
+%
+ \def\@ifauthorsunequalc@de#1{%
+ \if@F@cite
+ \@F@citefalse
+ \else
+ \if@Y@cite
+ {\@BAY}%
+ \fi
+ {\@BBC}%
+ \fi
+ \edef\@cite@undefined{?}%
+ \def\BBA{\@BBA}%
+ \if@A@cite
+ %%\hyper@natlinkstart{#1}% We remove this line...
+ {\csname b@\@citeb\APAC@extra@b@citeb\endcsname}%
+ %%\hyper@natlinkend% ...and this one.
+ \if@Y@cite
+ {\@BBAY}%
+ \fi
+ \fi
+ \if@Y@cite
+ \hyper@natlinkstart{#1}%
+ {\csname Y@\@citeb\APAC@extra@b@citeb\endcsname}%
+ \hyper@natlinkend
+ \fi
+ \let\BBA\relax
+ }
+%
+% The Spanish language support file defines a different version of
+% |\@ifauthorsunequalc@de|, which might override the patch we have just
+% introduced. So we employ the same test that \textsf{apacite} uses when
+% deciding whether to load that file; if successful, we patch the Spanish
+% version. Note that as \textsf{apacite} loads language support files
+% |\AtBeginDocument|, we have to do our thing after that, |\AfterEndPreamble|.
+%
+% (Note that as we set the language to British English earlier, this should
+% never be needed, but we try to be resilient to tinkering!)
+%
+ \AfterEndPreamble{%
+ \@ifundefined{iflanguage}{%
+ \relax
+ }{%
+ \edef\APAC@tmp{nohyphenation}%
+ \ifx\languagename\APAC@tmp
+ \else
+ \edef\APAC@tmp{spanish}%
+ \ifx\languagename\APAC@tmp
+ \def\@ifauthorsunequalc@de#1{%
+ \if@F@cite
+ \@F@citefalse
+ \else
+ \if@Y@cite
+ {\@BAY}%
+ \fi
+ {\@BBC}%
+ \fi
+ \edef\@cite@undefined{?}%
+ \def\BBA{\@BBA}%
+ \@ifundefined{spanishe@\@citeb\APAC@extra@b@citeb}%
+ {}% skip
+ {{% Use `e' instead of `y' in Spanish
+ \global\let\oldBBA\BBA
+ \global\def\BBA{e\global\let\BBA\oldBBA}%
+ }}%
+ \if@A@cite
+ %%\hyper@natlinkstart{#1}% We remove this line...
+ {\csname b@\@citeb\APAC@extra@b@citeb\endcsname}%
+ %%\hyper@natlinkend% ...and this one.
+ \if@Y@cite
+ {\@BBAY}%
+ \fi
+ \fi
+ \if@Y@cite
+ \hyper@natlinkstart{#1}%
+ {\csname Y@\@citeb\APAC@extra@b@citeb\endcsname}%
+ \hyper@natlinkend
+ \fi
+ \let\BBA\relax
+ }%
+ \fi
+ \fi
+ }%
+%
+% Another thing \textsf{apacite} does |\AtBeginDocument| is set the URL style
+% to monospaced. So we reset it back to normal roman type |\AfterEndPreamble|.
+%
+ \urlstyle{APACrm}
+ }%
+%
+% We pre-empt \textsf{apacite}'s |\providecommand| of |\doi| with our own
+% definition that includes the `doi' URI scheme label in the link, remembering
+% to remove the one inserted by |\doiprefix|.
%
- \AfterEndPreamble{\urlstyle{APACrm}}%
\newcommand{\doi}[1]{\href{http://dx.doi.org/#1}{\nolinkurl{doi:#1}}}%
\renewcommand{\doiprefix}{\unskip}%
}{}%
@@ -851,23 +1038,22 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
% Both \textsf{biblatex} and \textsf{apacite} use |\bibitemsep| for the space
% between bibliography items. Just in case they haven't been loaded, though, we
% protect our setting of that length with an |\ifx| test.
-%
+%
\ifx\undefined\bibitemsep
\else
\setlength{\bibitemsep}{1em plus 1ex minus 1ex}%
\fi
}
%
-% If \textsf{apacite} is used, we need to ensure that the references are a
-% normal section rather than an starred one so that they appear in the
-% PDF bookmarks.
-%
+% As mentioned above, if \textsf{apacite} is used, we can use a package option
+% to ensure that the reference list heading appears in the PDF bookmarks.
+%
\PassOptionsToPackage{numberedbib}{apacite}
%
% We, of course, use \textsf{hyperref} for enhancing the PDF with working links,
% bookmarks, metadata, etc.
-%
+%
\usepackage
[ colorlinks=true
, linkcolor=black
@@ -880,18 +1066,18 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
]{hyperref}
%
% Links should be in roman type, not monospaced.
-%
+%
\urlstyle{rm}
%
% We provide an |\email| command for displaying the email address of the
% corresponding author.
%
\newcommand*{\email}[1]{\href{mailto:#1}{#1}}
-\AtBeginDocument{%
%
% Once the user has had a chance to provide the metadata, we can add it to the
% PDF metadata.
%
+\AtBeginDocument{%
\hypersetup
{ pdftitle={\thetitle}
, pdfauthor={\MainAuthor}
@@ -901,7 +1087,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
% The APA has its own style for line breaks in URLs. The \textsf{apacite}
% package provides the code for this, but in case \textsf{biblatex} is used
% instead, we repeat the settings (from 2013/07/21 v6.03) here.
-%
+%
\@ifundefined{Url@force@Tilde}{\def\Url@force@Tilde{\relax}}{}%
\def\url@apa@dot{\mathchar"2E }%
\def\url@apa@comma{\mathchar"2C }%
@@ -936,7 +1122,8 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
%
% We need to make sure that any characters to appear verbatim in the XMP packet
% are treated as ordinary characters and not active ones. The likely active
-% characters are symbols and punctuation, so should be treated as `other'.
+% characters are symbols and punctuation, so should be treated as `other'
+% (category 12).
%
\begingroup
\catcode`\"=12
@@ -952,12 +1139,12 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
%
% For convenience we define |\sp| to be a level of indent, translating to three
% spaces.
-%
+%
\def\sp{\space\space\space}
%
% The text of the XMP packet is recorded in |\cc@xmp@packet|. We use |^^J| to
% break lines.
-%
+%
\long\gdef\cc@xmp@packet{%
<?xpacket begin='' id=''?>^^J%
<x:xmpmeta xmlns:x='adobe:ns:meta/'>^^J%
@@ -986,8 +1173,8 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
\endgroup
%
% Different workflows require the XMP packet to be embedded in different ways.
-%
-% Pdf\TeX\ has can inject objects into PDFs natively.
+%
+% Pdf\TeX\ can inject objects into PDFs natively.
%
\newcommand*{\ccxmp@embed@packet@pdftex}{%
\bgroup
@@ -1001,7 +1188,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
}
%
% The |\pdfmark| command defined by \textsf{hyperref} is respected by tools such
-% as |dvipdf|, |dvips|, |dvipsone|, etc.
+% as Dvipdf, Dvips, Dvipsone, etc.
%
\newcommand*{\ccxmp@embed@packet@pdfmark}{%
\pdfmark{%
@@ -1034,13 +1221,13 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
}%
}
%
-% |dvipdfm| has its own |\special| command for inserting PDF objects, but it is
-% a bit basic and requires advance knowledge of how long (in characters) the
-% object is.
+% Dvipdfm has its own |\special| command for inserting PDF objects, but
+% it is a bit basic and requires advance knowledge of how long (in characters)
+% the object is.
%
% The |\ccxmp@count@spaces| macro counts the number of spaces in its parameter
% through a process of iteration, adding this figure to |\@tempcnta|.
-%
+%
\def\ccxmp@count@spaces#1 {%
\def\ccxmp@one@token{#1}%
\ifx\ccxmp@one@token\@empty
@@ -1072,7 +1259,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
\expandafter\ccxmp@count@non@spaces#1{}%
}
%
-% So now, finally, is the command for embedding the packet using |dvipdfm|.
+% So now, finally, is the command for embedding the packet using Dvipdfm.
%
\newcommand*{\ccxmp@embed@packet@dvipdfm}{%
\ccxmp@string@len{\cc@xmp@packet}%
@@ -1091,8 +1278,8 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
}%
}
%
-% \XeTeX\ creates PDFs with |xdvipdfmx|, which has a slightly different
-% |\special| for inserting objects.
+% \XeTeX\ creates PDFs with Xdvipdfmx, which supports a simpler |\special| for
+% inserting objects that does not require us to count characters.
%
\newcommand*{\ccxmp@embed@packet@xetex}{%
\special{pdf:stream @ccxmp@packet (\cc@xmp@packet)
@@ -1108,10 +1295,10 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
}%
}
%
-% We rely on |hyperref| to tell us how the PDF will be generated (after all, it
-% may not be done in the current pass) and use the respective technique to embed
-% the XMP packet.
-%
+% We rely on \textsf{hyperref} to tell us how the PDF will be generated (after
+% all, it may not be done in the current pass) and use the respective technique
+% to embed the XMP packet.
+%
\AtBeginDocument{%
\begingroup
\def\ccxmp@driver{hpdftex}%
@@ -1134,6 +1321,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
\fi
\endgroup
}
+%LITERATE
%</base>
%<*biblatex|apacite>
@book{apa6ed,
@@ -1323,6 +1511,7 @@ the University of Edinburgh on behalf of the Digital Curation Centre. ISSN:
\keepsilent
\askforoverwritefalse
\preamble
+
----------------------------------------------------------------
The dccpaper bundle: Classes for submissions to IJDC and IDCC
Author: Alex Ball
@@ -1336,44 +1525,6 @@ See: http://www.latex-project.org/lppl.txt
Copyright (C) 2014 Digital Curation Centre, University of Edinburgh
<info@dcc.ac.uk>
-
-
-The text files contained in this work may be distributed and/or modified under
-the conditions of the LaTeX Project Public License (LPPL), either version 1.3c
-of this license or (at your option) any later version. The latest version of
-this license is in the file:
-
-http://www.latex-project.org/lppl.txt
-
-
-The image files dccpaper-by.eps and dccpaper-by.pdf derive from the file by.eps,
-available from the following URL:
-http://mirrors.creativecommons.org/presskit/buttons/88x31/eps/by.eps
-
-The images remain a trademark of Creative Commons and are subject to the
-Creative Commons trademark policy:
-http://creativecommons.org/policies
-
-
-This work is "maintained" (as per LPPL maintenance status) by Alex Ball.
-
-This work consists of the aforementioned image files, the file dccpaper.dtx and
-a Makefile.
-
-Running `make' generates the derived files
-
-* README
-* dccpaper.pdf
-* ijdc-v9.cls
-* idcc.cls
-* dccpaper-base.tex
-* dccpaper-apacite.bib
-* dccpaper-biblatex.bib
-
-Running `make inst' installs the files in the user's TeX tree.
-
-Running `make install' installs the files in the local TeX tree.
-
\endpostamble
\usedir{tex/latex/dccpaper}
@@ -1432,27 +1583,90 @@ Running `make install' installs the files in the local TeX tree.
\usepackage{enumitem}
\usepackage{listings}
\lstloadlanguages{[LaTeX]TeX}
-\lstset{%
- columns=fullflexible,
- basicstyle=\ttfamily,
- language={[LaTeX]TeX},
- texcsstyle=*\color{red!75!black},
- moretexcs={affil,correspondence,submitted,received,revised,accepted,%
- subno,volume,issue,maketitle,sisetup,toprule,cmidrule,%
- midrule,bottomrule,DeclareLanguageMapping,printbibliography,
- addbibresource,subsection,subparagraph},
- moredelim=**[s][\color{violet}]{[}{]},
- moredelim=**[s][\color{blue!75!black}]{\{}{\}},
- xleftmargin=\parindent,
- xrightmargin=\parindent,
- mathescape,
- escapechar=~
-}
+\lstset
+ { columns=fullflexible
+ , basicstyle=\ttfamily
+ , language={[LaTeX]TeX}
+ , texcsstyle=*\color{red!75!black}
+ , moretexcs=
+ { affil
+ , correspondence
+ , submitted
+ , received
+ , revised
+ , accepted
+ , subno
+ , volume
+ , issue
+ , maketitle
+ , sisetup
+ , toprule
+ , cmidrule
+ , midrule
+ , bottomrule
+ , DeclareLanguageMapping
+ , printbibliography
+ , addbibresource
+ , subsection
+ , subparagraph
+ }
+ , moredelim=**[s][\color{violet}]{[}{]}
+ , moredelim=**[s][\color{blue!75!black}]{\{}{\}}
+ , mathescape
+ , escapechar=~
+ }
\newcommand{\subtext}[1]{\ensuremath\langle\textit{\rmfamily#1}\rangle}
\usepackage[iso,british]{isodate}
\usepackage{readprov}
+
+% For typesetting the implementation
+\usepackage{metalogo}
+\usepackage{makedoc}
+\usepackage{niceverb}
+\renewcommand{\SetOffInlineCmdBox}{\textcolor{red!75!black}}
+\renewcommand*{\TreatAsCode}[1]{%
+ \ifPackageCode
+ \else
+ \WriteResult{\string\begin{lstlisting}[firstnumber=last]}%
+ \PackageCodeTrue
+ \fi
+ \WriteResult{#1}%
+}
+\renewcommand*{\TreatAsComment}[1]{%
+ \ifPackageCode
+ \WriteResult{\string\end{lstlisting}}%
+ \WriteResult{}
+ \PackageCodeFalse
+ \EveryComment
+ \fi
+ \WriteResult{#1}%
+}
+\makeatletter
+\PushCatMakeLetter\_
+\renewcommand*{\make_doc_arg}[1]{%
+ \makedoc_maybe_autocorr
+ \ifnum\value{lstnumber}>\z@
+ \WriteResult{\string\begin{lstlisting}[firstnumber=1]}%
+ \PackageCodeTrue
+ \else
+ \PackageCodeFalse
+ \fi
+ \ProcessFileWith{#1}{%
+ \CountInputLines
+ \makedoc_line_body
+ \process_line_message
+ }%
+ \ifPackageCode
+ \WriteResult{\string\end{lstlisting}}
+ \PackageCodeFalse
+ \fi
+}
+\PopLetterCat\_
+\makeatother
+
\begin{document}
+\noNiceVerb
\maketitle
\begin{abstract}
@@ -1467,6 +1681,8 @@ The version to which it relates is \UseVersionOf{dccpaper-base.tex}, last revise
The code for this bundle is maintained at \url{https://github.com/DigitalCurationCentre/dccpaper}.
Versions of the templates are also available that target Microsoft Word and LibreOffice\slash OpenOffice.org.
+
+Please note that the DOI attached to this document is fake and should not be used for identification purposes.
\end{abstract}
\section{Introduction}
@@ -1495,21 +1711,6 @@ In some cases the class prefers to use packages that are not part of the base in
For referencing, you are encouraged to use either \textsf{biblatex} using the styles provided by \textsf{biblatex-apa} (preferred), or \textsf{apacite}.
-%\section{Installation}
-%
-%Once you have compiled \textsf{dccpaper.dtx}, move the resulting files to the following locations:
-%
-%\begin{itemize}
-%\item
-%\textsf{tex/latex/dccpaper}: \textsf{ijdc-v9.cls}, \textsf{idcc.cls}, \textsf{dccpaper-base.tex}, \textsf{dccpaper-by.eps}, \textsf{dccpaper-by.pdf}
-%\item
-%\textsf{source/latex/dccpaper}: \textsf{dccpaper.dtx}, \textsf{dccpaper.ins}
-%\item
-%\textsf{doc/latex/dccpaper}: \textsf{README}, \textsf{dccpaper-biblatex.bib}, \textsf{dccpaper-apacite.bib}
-%\end{itemize}
-%
-%A makefile is provided to help automate this process.
-
\section{Loading the classes}
The class is loaded in the usual way with
@@ -1712,7 +1913,7 @@ Table~\ref{tab:issues} demonstrates these features. The code used to produce the
\begin{table}[ht]
\caption{Papers and articles published in the IJDC in 2008 and 2009.}
\label{tab:issues}
-\sisetup{table-number-alignment=center,table-figures-integer=2,table-figures-decimal=0}%
+\sisetup{table-number-alignment=center,table-figures-integer=2,table-figures-decimal=0}%
\centering\small
\begin{tabular}{lSSS[table-figures-decimal=1]S[table-figures-decimal=1]}
\toprule
@@ -1734,10 +1935,10 @@ Issue & {Peer-reviewed} & {General} & {Peer-reviewed} & {General} \\
\begin{table}
\caption{Papers and articles published in the IJDC in 2008 and 2009.}
\label{tab:issues}
-\sisetup{table-number-alignment=center,table-figures-integer=2,%
- table-figures-decimal=0}%
+\sisetup{table-number-alignment=center,table-figures-integer=2,%
+ table-figures-decimal=0}%
\centering\small
-\begin{tabular}{lSSS[table-figures-decimal=1]%
+\begin{tabular}{lSSS[table-figures-decimal=1]%
S[table-figures-decimal=1]}
\toprule
& \multicolumn{2}{c}{Frequency} & \multicolumn{2}{c}{Percentage} \\
@@ -1796,12 +1997,140 @@ Any acknowledgements should be placed in a section immediately before the refere
\subsection{Change History}
\begin{description}
-\item[v1.1] 2014-02-24\\
-Refactored for distribution through CTAN, and to allow the addition of the \textsf{idcc} class.
+\item[v1.2] 2014-04-11\\
+Added implementation, installation and licence sections to the Appendix of the documentation. Moved the majority of the file postamble information to the README, and synchronized the latter with the GitHub version. Improved the adaptation of \textsf{apacite} referencing to the house style.
+\item[v1.1] 2014-03-06\\
+Refactored the source for distribution through CTAN, and to allow the addition of the \textsf{idcc} class.
\item[v1.0] 2013-12-18\\
First public release of \textsf{ijdc-v9} class.
\end{description}
+\subsection{Implementation}
+
+\lstset
+ { aboveskip=1em plus 0.5em minus 0.2em
+ , belowskip=1em plus 0.5em minus 0.2em
+ , frame=single
+ , numbers=left
+ , numberstyle=\footnotesize\itshape
+ , basicstyle=\footnotesize\ttfamily
+ , breaklines=true
+ , escapechar=
+ }%
+\useNiceVerb
+
+\subsubsection{ijdc-v9.cls}
+
+\renewcommand*{\mdJobName}{ijdc-v9}
+\MakeInputJobDoc[cls]{0}{\ProcessInputWith{PScomment}}
+
+\subsubsection{idcc.cls}
+
+\renewcommand*{\mdJobName}{idcc}
+\MakeInputJobDoc[cls]{0}{\ProcessInputWith{PScomment}}
+
+\subsubsection{dccpaper-base.tex}
+
+\renewcommand*{\mdJobName}{dccpaper-base}
+\MakeInputJobDoc[tex]{0}{\ProcessInputWith{PScomment}}
+
+\noNiceVerb
+
+\subsection{Installation}
+
+\subsubsection{Managed way}
+
+The latest stable release of the dccpaper bundle has been packaged for
+\TeX\ Live and MiK\TeX. If you are running \TeX\ Live and have \texttt{tlmgr}
+installed, you can install the bundle simply by running
+\texttt{tlmgr install dccpaper}. If you are running MiK\TeX, you can
+install the bundle by running \texttt{mpm -{}-install=dccpaper}. Both
+\texttt{tlmgr} and \texttt{mpm} have GUI versions that you might find
+friendlier.
+
+\subsubsection{Automated way}
+
+A makefile is provided which you can use with the Make utility:
+
+\begin{itemize}
+\item
+ Running \texttt{make} generates the derived files
+
+ \begin{itemize}
+ \item
+ README
+ \item
+ dccpaper.pdf
+ \item
+ ijdc-v9.cls
+ \item
+ idcc.cls
+ \item
+ dccpaper-base.tex
+ \item
+ dccpaper-apacite.bib
+ \item
+ dccpaper-biblatex.bib
+ \end{itemize}
+\item
+ Running \texttt{make inst} installs the files in the user's \TeX\ tree.
+\item
+ Running \texttt{make install} installs the files in the local \TeX\
+ tree.
+\end{itemize}
+
+\subsubsection{Manual way}
+
+\begin{enumerate}
+\item
+ Compile dccpaper.dtx just as you would a normal \LaTeX\ file. Bear in
+ mind the documentation requires the \textsf{biblatex} package and the Biber
+ tool rather than regular Bib\TeX. As well as the usual PDF (or DVI) and
+ auxiliary files, several others are generated.
+\item
+ Rename README.txt to README (if you like).
+\item
+ Move the files to your \TeX\ tree as follows:
+
+ \begin{itemize}
+ \item
+ \path{source/latex/dccpaper}: dccpaper.dtx, dccpaper.ins
+ \item
+ \path{tex/latex/dccpaper}: ijdc-v9.cls, idcc.cls,
+ dccpaper-base.tex, dccpaper-by.eps, dccpaper-by.pdf
+ \item
+ \path{doc/latex/dccpaper}: dccpaper.pdf, dccpaper-apacite.bib,
+ dccpaper-biblatex.bib, README
+ \end{itemize}
+\item
+ You may then have to update your installation's file name database
+ before \TeX\ and friends can see the files.
+\end{enumerate}
+
+\subsection{Licence}
+
+Copyright \textcopyright\ 2014 Digital Curation Centre, University of Edinburgh.
+
+This work consists of the image files dccpaper-by.eps and
+dccpaper-by.pdf, the documented LaTeX file dccpaper.dtx and a Makefile.
+
+The text files contained in this work may be distributed and/or modified
+under the conditions of the
+\href{http://www.latex-project.org/lppl.txt}{LaTeX Project Public
+License (LPPL)}, either version 1.3c of this license or (at your option)
+any later version.
+
+The image files distributed with this bundle derive from the file
+\href{http://mirrors.creativecommons.org/presskit/buttons/88x31/eps/by.eps}{by.eps}
+distributed by Creative Commons. The image is a trademark of Creative
+Commons and is subject to the
+\href{http://creativecommons.org/policies}{Creative Commons trademark
+policy}.
+
+This work is ``maintained'' (as per LPPL maintenance status) by
+\href{http://alexball.me.uk/}{Alex Ball}.
+
+The file dccpaper.pdf, generated by this work, is licensed as shown on page 1.
\end{document}
%</driver>
% \fi