summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/confproc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-10-01 13:34:34 +0000
committerKarl Berry <karl@freefriends.org>2007-10-01 13:34:34 +0000
commit127cf2f1ba829680b88bbc568d6f2119f9f7cc34 (patch)
tree8a1b67e0b1fb66de0f5680b45dccfc427f9d3c54 /Master/texmf-dist/tex/latex/confproc
parent3d0b56032a05e361ddea38a674d2cbfb8455d3ba (diff)
new latex package confproc (29sep07)
git-svn-id: svn://tug.org/texlive/trunk@5076 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/confproc')
-rw-r--r--Master/texmf-dist/tex/latex/confproc/confproc.cls462
-rw-r--r--Master/texmf-dist/tex/latex/confproc/newapave.sty269
2 files changed, 731 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/confproc/confproc.cls b/Master/texmf-dist/tex/latex/confproc/confproc.cls
new file mode 100644
index 00000000000..4f1eebb814a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/confproc/confproc.cls
@@ -0,0 +1,462 @@
+\ProvidesClass{confproc}
+ [2007/09/24 v0.2i: Conference Proceedings class (VV)]
+\LoadClass{book}
+\DeclareOption{a4paper}
+ {\setlength\paperheight {297mm}%
+ \setlength\paperwidth {210mm}%
+ \setlength\oddsidemargin {-4.95truemm}%
+ \setlength\evensidemargin {-10.95truemm}%
+ \def\shiftsafourpaper{}}
+\DeclareOption{letterpaper}
+ {\setlength\paperheight {11in}%
+ \setlength\paperwidth {8.5in}%
+ \setlength\oddsidemargin {-4.95truemm}%
+ \setlength\evensidemargin {-4.95truemm}%
+ \def\shiftsletterpaper{}}
+\PassOptionsToPackage{a4paper,letterpaper}{book}
+\PassOptionsToPackage{a4paper,letterpaper}{hyperref}
+\DeclareOption{10pt}{\renewcommand\@ptsize{0}}
+\DeclareOption{11pt}{\renewcommand\@ptsize{1}}
+\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
+\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse%
+ \def\conf@WithClearsinglepage{}}
+\DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue%
+ \def\conf@WithCleardoublepage{}}
+\DeclareOption{compil=bibmerge}
+ {\typeout{confproc: LaTeX run-> bib. items only (merging process)}%
+ \def\conf@BibMerge{}}
+\DeclareOption{compil=bibbackref}
+ {\typeout{confproc: LaTeX run-> generating biblio back references}%
+ \def\conf@BibBackRef{}}
+\DeclareOption{compil=last}
+ {\typeout{!!! confproc: LaTeX run-> LAST !!!}%
+ \def\conf@FinalVersion{}}
+\DeclareOption{draft}
+ {\typeout{confproc: not including PDF files}%
+ \PassOptionsToPackage{draft}{pdfpages}%
+ \def\conf@DoNotIncludePDFs{}}
+\DeclareOption{final}
+ {\typeout{confproc: including PDF files}%
+ \PassOptionsToPackage{final}{pdfpages}%
+ \def\conf@IncludePDFs{}}
+\DeclareOption{electronic}%
+ {\typeout{confproc: adding colors for hyperlinks}%
+ \PassOptionsToPackage{colorlinks=true}{hyperref}%
+ \def\conf@procWithColors{}}
+\DeclareOption{printed}%
+ {\typeout{confproc: hyperref with no color for hyperlinks}
+ \PassOptionsToPackage{colorlinks=false}{hyperref}%
+ \def\conf@procWithoutColors{}}
+\DeclareOption{headers=no}%
+ {\typeout{confproc: no fancy headers}%
+ \def\conf@NoFancyHeaders{}}
+\DeclareOption{headers=pdfonly}%
+ {\typeout{confproc: fancy headers on inserted PDFs only}%
+ \def\conf@FancyHeadersOnPapers{}}
+\DeclareOption{headers=exceptpdf}%
+ {\typeout{confproc: fancy headers for all pages except PDFs}%
+ \def\conf@FancyHeadersExceptPapers{}}
+\DeclareOption{headers=allpages}%
+ {\typeout{confproc: fancy headers on all pages, PDFs included}%
+ \def\conf@FancyHeadersOnPapers{}%
+ \def\conf@FancyHeadersExceptPapers{}}
+\DeclareOption{twocolindex}
+ {\typeout{confproc: 2 columns index}%
+ \def\conf@TwoColumnIndex{}}
+\DeclareOption{threecolindex}
+ {\typeout{confproc: 3 columns index}%
+ \def\conf@ThreeColumnIndex{}}
+\DeclareOption{twocolbib}
+ {\typeout{confproc: 2 columns biblio}%
+ \def\conf@TwoColumnBib{}}
+\DeclareOption{onecolbib}
+ {\typeout{confproc: 1 column biblio}%
+ \def\conf@OneColumnBib{}}
+\DeclareOption{twocoltoc}
+ {\typeout{confproc: 2 columns TOC}%
+ \def\conf@TwoColumnTOC{}}
+\DeclareOption{onecoltoc}
+ {\typeout{confproc: 1 column TOC}%
+ \def\conf@OneColumnTOC{}}
+\DeclareOption{tocnumleft}
+ {\typeout{confproc: TOC numbering on left}%
+ \def\conf@TocNumberingLeft{}}
+\DeclareOption{tocnumright}
+ {\typeout{Confproc: TOC numbering on right}%
+ \def\conf@TocNumberingRight{}}
+\DeclareOption{movepagenumbers}
+ {\typeout{confproc: moving page numbers to check PDFs numbering}%
+ \def \conf@TestPageNumbering{}}
+\DeclareOption{cleardoublepage}%
+ {\typeout{confproc: using double page clearing}%
+ \def\conf@WithCleardoublepage{}}
+\DeclareOption{clearsinglepage}%
+ {\typeout{confproc: using double page clearing}%
+ \def\conf@WithClearsinglepage{}}
+\DeclareOption{debug}
+ {\typeout{Confproc: printing debug for confproc, hyperref}%
+ \PassOptionsToPackage{debug}{hyperref}%
+ \def\conf@procWithDebug{}}
+\DeclareOption{verbose}
+ {\typeout{Confproc: printing debug for confproc, hyperref}%
+ \PassOptionsToPackage{debug}{hyperref}%
+ \def\conf@procWithDebug{}}
+\DeclareOption*{\PackageWarning{procconf}%
+ {Unknown option `\CurrentOption'; passed to 'hyperref'}%
+ \PassOptionsToClass{\CurrentOption}{hyperref}}
+\ExecuteOptions{letterpaper,10pt,twoside,%
+ compil=bibbackref,tocnumleft,onecoltoc,threecolindex,twocolbib,%
+ colorlinks=true,linkcolor=red,citecolor=blue,pagecolor=red,urlcolor=blue,%
+ bookmarksopen=true,bookmarksopenlevel=1,headers=no}
+\ProcessOptions
+\RequirePackage{graphicx}
+\RequirePackage{pdfpages}
+\RequirePackage{fancyhdr}
+\RequirePackage[nottoc,notbib,notindex]{tocbibind}
+\RequirePackage{titletoc}
+\ifdefined\conf@TwoColumnTOC
+ \RequirePackage[toc]{multitoc}
+\fi
+\RequirePackage{index}
+\RequirePackage{multicol}
+\ifdefined\conf@TwoColumnIndex
+ \renewenvironment{theindex}{%
+ \if@twocolumn \@restonecolfalse
+ \else \@restonecoltrue \fi
+ \vspace*{-0.8cm}
+ \section*{{\procindexname}}
+ \let\item\@idxitem
+ \columnseprule \z@
+ \columnsep 35\p@
+ \begin{multicols}{2}[%
+ \ifx\index@prologue\@empty\else
+ \index@prologue
+ \bigskip
+ \fi]%
+ \parindent\z@
+ \parskip\z@ \@plus .3\p@\relax
+ }{\end{multicols}%
+ \if@restonecol \onecolumn
+ \else \clearpage \fi}
+\else
+ \ifdefined\conf@ThreeColumnIndex%
+ \renewenvironment{theindex}{%
+ \if@twocolumn \@restonecolfalse
+ \else \@restonecoltrue \fi
+ \vspace*{-0.8cm}
+ \section*{{\procindexname}}
+ \let\item\@idxitem
+ \columnseprule \z@
+ \columnsep 35\p@
+ \begin{multicols}{3}[%
+ \ifx\index@prologue\@empty\else
+ \index@prologue
+ \bigskip
+ \fi]%
+ \parindent\z@
+ \parskip\z@ \@plus .3\p@\relax
+ }{\end{multicols}%
+ \if@restonecol \onecolumn
+ \else \clearpage \fi }
+ \fi
+\fi
+\RequirePackage{sectsty}
+\newcommand{\confcite}[1]{\cite{#1}}
+\RequirePackage{newapave}
+\RequirePackage{color}
+\definecolor{colorforlink}{rgb}{0,0,0.5}
+\definecolor{colorforpage}{rgb}{0,0,0.5}
+\definecolor{colorforcite}{rgb}{0,0.5,0}
+\definecolor{colorforurl}{cmyk}{0,1,0,0}
+\RequirePackage[pdftex,raiselinks,hyperindex,backref,pagebackref,%
+ plainpages=false,pdfpagelabels,breaklinks,linktocpage,%
+ pdfstartview=XYZ]{hyperref}
+\RequirePackage[figure,table]{hypcap}
+\newcommand{\procpdfauthor}{Proceedings author/editor}
+\newcommand{\procpdftitle}{Proceedings title}
+\newcommand{\procpdfsubject}{Proceedings description}
+\hypersetup{
+ pdfauthor = \procpdfauthor,
+ pdftitle = \procpdftitle,
+ pdfsubject = \procpdfsubject,
+ pdfkeywords = {},
+ pdfcreator = {LaTeX with `confproc' package},
+ pdfproducer = {pdfLaTeX}}
+\topmargin 0truept
+\headheight 12truept
+\footskip 0truept
+\textheight 229truemm
+\textwidth 175truemm
+\voffset -28truept
+\headsep 20truept
+\renewcommand{\contentsname}{\vspace*{-0.8cm}\Large %
+ \bfseries Conference Program}
+\newcommand{\procindexname}{\large \bfseries Index of Authors}
+\newcommand{\procbibname}{\large \bfseries Full Bibliography}
+\newcommand{\proclhead}{\em{\small{Proceedings of the blah blah blah}}}
+\newcommand{\proccfoot}{{\vskip 11mm}{\small Proc-\thepage}}
+\pagestyle{fancyplain}
+\renewcommand{\headrulewidth}{0pt}
+\renewcommand{\footrulewidth}{-5mm}
+\lhead{\proclhead}
+\rhead{}
+\lfoot{}
+\rfoot{}
+\cfoot{\proccfoot}{}
+\ifdefined \conf@FancyHeadersExceptPapers
+ \pagestyle{fancy}
+\else
+ \pagestyle{empty}
+\fi
+\newlength{\procoptfootskip}
+\ifdefined\conf@TestPageNumbering%
+ \setlength{\procoptfootskip}{3mm}%
+ \cfoot{\vskip \procoptfootskip \proccfoot}%
+\else%
+ \setlength{\procoptfootskip}{0mm}%
+\fi
+\ifdefined\conf@TocNumberingRight
+ \titlecontents{section}[2.5em]% left margin
+ {\vspace*{0.3em}}% space between two papers in the TOC
+ {}{}{\contentsmargin{0pt} \hfill \contentspage}% filler and page
+\else%
+ \dottedcontents{section}[]{\fillright}{}{1pc}
+ \titlecontents{section}[2.5em]%
+ {\vspace*{0.3em}}%
+ {\hspace*{-2.5em}\contentspage\hspace*{2.5em}}% left shifting page num.
+ {\hspace*{-2.5em}\contentspage\hspace*{2.5em}}% idem
+ {}% filler and page
+\fi
+\newcommand{\tocmattertocstyle}{
+\titlecontents{part}[-1em]{\addvspace{1pc}}%
+ {\contentspage\hspace*{3.2em}\contentsmargin{0pt}%
+ \makebox[0pt][r]{\huge\thecontentslabel\enspace}\large}%
+ {\contentspage\hspace*{3.2em}\contentsmargin{0pt}\large}%
+ {}[\addvspace{.5pc}]}
+\titlecontents{chapter}[-1em]{\addvspace{1pc}}%
+ {\contentspage\hspace*{3.2em}\contentsmargin{0pt}%
+ \makebox[0pt][r]{\huge\thecontentslabel\enspace}\large}%
+ {\contentspage\hspace*{3.2em}\contentsmargin{0pt}\large}%
+ {}[\addvspace{.5pc}]
+\ifdefined\conf@TocNumberingRight
+ \newcommand{\mainmattertocstyle}{
+ \titlecontents{chapter}[0pt]%
+ {\addvspace{1pc}\bfseries\itshape}%
+ {\contentsmargin{0pt}\bfseries%
+ \makebox[0pt][r]{\huge\thecontentslabel\enspace}\large}%
+ {\contentsmargin{0pt}\large}{}[\addvspace{.5pc}]%
+ \titlecontents{part}[0pt]%
+ {\addvspace{1pc}\bfseries}%
+ {\contentsmargin{0pt}\bfseries%
+ \makebox[0pt][r]{\huge\thecontentslabel\enspace}\large}%
+ {\contentsmargin{0pt}\large}{}[\addvspace{.5pc}]%
+\else
+ \ifdefined\conf@TocNumberingLeft% default
+ \newcommand{\mainmattertocstyle}{%
+ \titlecontents{chapter}[0pt]%
+ {\addvspace{1pc}\bfseries \itshape}%
+ {\contentsmargin{0pt}\bfseries %
+ \makebox[0pt][r]{\huge\thecontentslabel\enspace}\large}%
+ {\contentsmargin{0pt}\large}{}[\addvspace{.5pc}]%
+ \titlecontents{part}[0pt]%
+ {\addvspace{1pc}\bfseries}%
+ {\contentsmargin{0pt}\bfseries %
+ \makebox[0pt][r]{\huge\thecontentslabel\enspace}\large}%
+ {\contentsmargin{0pt}\large}{}[\addvspace{.5pc}]%
+ }
+ \else
+ \newcommand\mainmattertocstyle{}
+ \fi
+\fi
+\ifdefined\conf@TocNumberingRight
+ \newcommand{\backmattertocstyle}{
+ \titlecontents{section}[]{}{}{}{}[]%
+ \titlecontents{part}%
+ [0pt]{\addvspace{1pc}}{}{}%
+ {\contentsmargin{0pt} \large \hfill\contentspage}%
+ [\addvspace{.5pc}]%
+ }%
+\else%
+ \ifdefined\conf@TocNumberingLeft%
+ \newcommand{\backmattertocstyle}{%
+ \titlecontents{section}[]{}{}{}{}[]%
+ \titlecontents{part}%
+ [0pt]%
+ {\addvspace{1pc}}%
+ {\contentspage\hspace*{2.5em}\contentsmargin{0pt}%
+ \bfseries%
+ \makebox[0pt][r]{\huge\thecontentslabel\enspace}%
+ \large}%
+ {\contentspage\hspace*{2.5em}\contentsmargin{0pt} \large}%
+ {}%
+ [\addvspace{.5pc}]%
+ }%
+ \else%
+ \newcommand\backmattertocstyle{}%
+ \fi%
+\fi
+\ifdefined\conf@FancyHeadersExceptPapers
+ \newcommand{\otherpagestyle}{\pagestyle{fancy}}
+ \newcommand{\thisotherpagestyle}{\thispagestyle{fancy}}
+\else
+ \newcommand{\otherpagestyle}{\pagestyle{empty}}
+ \newcommand{\thisotherpagestyle}{\thispagestyle{empty}}
+\fi
+\ifdefined\conf@FancyHeadersOnPapers
+ \newcommand{\PDFpagestyle}{\thispagestyle{fancy}}
+\else
+ \newcommand{\PDFpagestyle}{\thispagestyle{empty}}
+\fi
+\chapterfont{\thisotherpagestyle}
+\ifdefined\conf@WithCleardoublepage
+ \newcommand{\clearsingleordoublepage}{\cleardoublepage}
+\else
+ \ifdefined\conf@WithClearsinglepage
+ \newcommand{\clearsingleordoublepage}{\clearpage}
+ \else
+ \newcommand{\clearsingleordoublepage}{\cleardoublepage}
+ \fi
+\fi
+\ifdefined\conf@FinalVersion
+ \newcommand{\UseBackRef}{}
+\else
+ \newcommand{\CreateBackRef}{}
+\fi
+\newlength{\LaTeXxShift}
+\newlength{\LaTeXyShift}
+\newlength{\WordxShift}
+\newlength{\WordyShift}
+\ifdefined\shiftsafourpaper
+ \setlength{\LaTeXxShift}{0pt}
+ \setlength{\LaTeXyShift}{28pt}
+ \setlength{\WordxShift}{10pt}
+ \setlength{\WordyShift}{-40pt}
+\else
+ \ifdefined\shiftsletterpaper
+ \setlength{\LaTeXxShift}{8.45pt}
+ \setlength{\LaTeXyShift}{-3pt}
+ \setlength{\WordxShift}{10pt}
+ \setlength{\WordyShift}{-40pt}
+ \fi
+\fi
+\newcommand{\papertitle}{}
+\newcommand{\paperauthors}{}
+\newcommand{\paperindex}{}
+\newcommand{\paperref}{}
+\newcommand{\paperpagenum}{}
+\newcommand{\papercite}{}
+\newcommand{\papertitlestyle}{}
+\newcommand{\paperauthorstyle}{\texorpdfstring{\newline\it}{\break}}
+\newcounter{paperpagenum}
+\newcommand{\proctoctitleauthor}[2]{%
+ \texorpdfstring{{\papertitlestyle#1}{\paperauthorstyle#2}}%
+ {{\papertitlestyle#1}}}
+\newcommand{\procinsertpaper}[9]{
+ \setcounter{paperpagenum}{#2}
+ #6%
+ \includepdf[noautoscale,offset= #1,pages=1,%
+ linktodoc,linkname=\PAPERPATH #8.pdf,%
+ addtotoc={1, section, 1, \proctoctitleauthor{#4}{#5}, #3},%
+ pagecommand = {#9\PDFpagestyle}%
+ ]{\PAPERPATH #8.pdf}%
+ \ifdefined\conf@BibMerge%
+ \includepdf[noautoscale,offset= #1,pages=\thepaperpagenum,%
+ linktodoc,linkname=\PAPERPATH #8.pdf,%
+ ]{\PAPERPATH #8.pdf}%
+ \PDFpagestyle{}%
+ \confcite{#7}%
+ \ifdefined\conf@procWithDebug
+ \typeout{confproc: bibliography insertion only}
+ \fi
+ \else
+ \ifdefined\CreateBackRef
+ \addtocounter{paperpagenum}{-1}
+ \includepdf[noautoscale,offset= #1,pages=2-\thepaperpagenum,%
+ linktodoc,linkname=\PAPERPATH #8.pdf,%
+ pagecommand = {\PDFpagestyle}%
+ ]{\PAPERPATH #8.pdf}%
+ \PDFpagestyle{}%
+ \confcite{#7}%
+ \ifdefined\conf@procWithDebug
+ \typeout{confproc: partial paper insertion (last page=bib items)}
+ \fi
+ \else
+ \ifdefined\UseBackRef
+ \includepdf[noautoscale,offset= #1,pages=2-,%
+ linktodoc,linkname=\PAPERPATH #8.pdf,%
+ pagecommand = {\PDFpagestyle}%
+ ]{\PAPERPATH #8.pdf}%
+ \fi
+ \ifdefined\conf@procWithDebug
+ \typeout{confproc: full paper insertion (last LaTeX run)}
+ \fi
+ \fi
+ \fi
+ \ifdefined\conf@procWithDebug
+ \typeout{---> file: #8.pdf (#2 pages)}
+ \typeout{---> title: #4}
+ \typeout{---> author(s): #5}
+ \typeout{---> index: #6}
+ \fi
+ \newpage
+ \clearsingleordoublepage
+}
+\setlength{\itemindent}{-2em}
+\setlength{\leftmargin}{1em}
+\setlength{\bibhang}{0.5em}
+\def\thebibliography#1{%
+ \section*{\bibname}
+ \addcontentsline{toc}{part}{\bibname}
+ \list
+ {\relax}{\setlength{\labelsep}{0em}
+ \setlength{\itemindent}{-\bibhang}
+ \setlength{\leftmargin}{\bibhang}}
+ \def\newblock{\hskip 0em plus 0.0em minus .07em} % DAFx-06
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=1000\relax}
+\newcommand{\proctableofcontents}{%
+ \tocmattertocstyle
+ \clearsingleordoublepage
+ \addtocontents{toc}{\protect\vspace*{-1.3cm}}
+ \pdfbookmark[0]{Program}{contents}
+ \tableofcontents
+ \clearsingleordoublepage
+}
+\newcommand{\procday}[1]{%
+ \phantomsection%
+ \addcontentsline{toc}{part}{#1}}
+\newcommand{\session}[1]{%
+ \phantomsection%
+ \addcontentsline{toc}{chapter}{#1}}
+\newcommand{\paperswitch}{}
+\newcommand{\setbibitems}{%
+ \ifdefined\conf@TwoColumnBib%
+ \twocolumn
+ \fi
+ \ifdefined\conf@BibMerge%
+ \nocite{*}%
+ \else%
+ \clearsingleordoublepage%
+ \fi%
+ \renewcommand{\bibname}{\procbibname}
+%% \addcontentsline{toc}{part}{\procbibname}
+}
+\newcommand{\procbibintro}{{\it ~~~This bibliography is a compilation
+ of all bibliographic references from each paper. Page numbers that
+ appear at the end of each entry link to the bibliography sections that
+ include it. Please click on the URL or on the page number to access
+ the linked item.}}
+\newcommand{\insertindex}{
+ \clearsingleordoublepage
+ \onecolumn
+ \section*{~~}%
+ \addcontentsline{toc}{part}{\procindexname}%
+ \renewcommand{\proclhead}{}%
+ \renewcommand{\proccfoot}{}%
+ \renewcommand{\indexname}{\procindexname}%
+ \printindex}
+\InputIfFileExists{confproc.cfg}
+ {\typeout{************^^J%
+ * Local config file confproc.cfg used *^^J%
+ ************}
+ }{}%
diff --git a/Master/texmf-dist/tex/latex/confproc/newapave.sty b/Master/texmf-dist/tex/latex/confproc/newapave.sty
new file mode 100644
index 00000000000..890b42786c4
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/confproc/newapave.sty
@@ -0,0 +1,269 @@
+%$$$ newapave.sty $$$ --- July 31, 2006 (Version 2.1)
+% - Version 2.1.
+%
+% This file implements citations for the ``newapave'' bibliography style.
+%
+% Stephen N. Spencer
+% modified the ``apalike'' LaTeX style
+% Young U. Ryu
+% further modified
+% Vincent Verfaille
+% modified as 'newapave' for DAFx-06: right-flushed back-references!
+%
+% SEE THE FOLLOWING COMMENTS. THEY CONSISTS OF 4 SECTIONS
+% 1 - newapave.bst and \bibitem entry
+% 2 - citation formats
+% 3 - changing citation functions (if you want)
+% 4 - enforcing APA style section heading (if you want)
+%
+%%%%%
+% [1] newapave.bst and \bibitem entry
+%
+% The ``newapave.bst'' BibTeX bibliography style creates citations with labels:
+% \citeauthoryear{author-info}{abbrev. author-info}{year}
+%
+%%%%%
+% [2] Citation Formats
+%
+% The citations are enclosed within parentheses. ``(,)''
+% as default. But one may change them.
+% Short author lists use the ``et al.'' construct.
+% These labels are processed by the following LaTeX commands:
+%
+% \cite[optional notes]{Key(s)}
+% -> (Authors1, Year1; Authors2, Year2; ..., optional notes)
+% \citeA[optional notes]{key}
+% -> Authors (Year, optional notes)
+% Note: ONE AND ONLY ONE KEY.
+% \citeA[pp.~3--5]{Apt88,Lloyd87} does not make sense at all.
+% In this case, the outcome will look aweful.
+% \citeB{keys}
+% -> Authors1 (Year1), Authors2 (Year2), ...
+% Note: \citeB[Notes]{keys} are given, notes will be ingored,
+% because it does not make sense at all.
+% \citeauthor[optional notes]{key}
+% -> Authors1, Authors2, ..., optional notes
+%
+% The difference between `\shortciteXXX' and `\citeXXX':
+% is that `\shortciteXXX' gives `First author et al.'
+% if no. authors >= 3.
+%
+% \shortcite[optional notes]{Key(s)}
+% -> (Short Authors1, Year1; Short Authors2, Year2; ..., optional notes)
+% \shortciteA[optional notes]{key}
+% -> Short Authors (Year, optional notes)
+% Note: ONE AND ONLY ONE KEY.
+% \shortciteA[pp.~3--5]{Apt88,Lloyd87} does not make sense at all.
+% In this case, the outcome will look aweful.
+% \shortciteB{keys}
+% -> Authors1 (Year1), Authors2 (Year2), ...
+% Note: \citeB[Notes]{keys} are given, notes will be ingored,
+% because it does not make sense at all.
+% \shortciteauthor[optional notes]{key}
+% -> Short Authors1, Short Authors2, ..., optional notes
+%
+% \citeyear[optional notes]{key}
+% -> (Year, optional notes)
+%
+%%%%%
+% [3] Changing Citation Punctuations
+%
+% However, you may change citation punctuations.
+% \citepunct{open paren}%
+% {between authors}%
+% {between author year}%
+% {between citations}%
+% {before notes}%
+% {closing paren}
+%
+% For example,
+% \citepunct{[}{and}{ }{, }{: }{]}
+% - use square brackets
+% `and' between authors
+% space between author and year
+% comma between citations
+% comma before notes
+% e.g. [Apt and van Emden 1986, Lloyd 1985: Notes]
+%
+% The default is:
+% \citepunct{(}{\&}{, }{; }{, }{)}
+%
+% Notice spaces around punctuations in \citepunct!!!
+%
+%%%%%
+% [4] Enforcing APA Style Section Heading
+%
+% \newapasectioning redefines section headings as described
+% by the APA Publication Manual
+% \section - level 1 (toc entry, paageheading)
+% \subsection - level 2 (toc entry)
+% \subsection - level 3 (toc entry)
+% \paragraph - level 4
+% \subparagraph - level 3
+%
+% if place * after \section, \subsection, \subsubsection
+% section headings are not listed in the table of contents
+%
+\def\citestarts{(}
+\def\betweenauthors{\&}
+\def\betweenauthoryear{, }
+\def\betweencites{; }
+\def\beforenote{, }
+\def\citeends{)}
+%
+\def\citepunct#1#2#3#4#5#6{%
+ \def\citestarts{#1}
+ \def\betweenauthors{#2}
+ \def\betweenauthoryear{#3}
+ \def\betweencites{#4}
+ \def\beforenote{#5}
+ \def\citeends{#6} }
+%
+\let\@internalcite\cite
+%
+%
+\def\cite{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{%
+ \citestarts##1\if@tempswa \beforenote##2\fi\citeends}%
+ \def\citeauthoryear##1##2##3{##1\betweenauthoryear##3}\@internalcite}
+\def\citeA{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{%
+ ##1\if@tempswa \beforenote##2\fi\citeends}%
+ \def\citeauthoryear##1##2##3{##1 \citestarts##3}\@citedata}
+\def\citeB{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1}%
+ \def\citeauthoryear##1##2##3{##1 \citestarts##3\citeends}\@citedata}
+\def\citeauthor{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{%
+ ##1\if@tempswa \beforenote##2\fi}%
+ \def\citeauthoryear##1##2##3{##1}\@citedata}
+%
+%
+\def\shortcite{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{%
+ \citestarts##1\if@tempswa \beforenote##2\fi\citeends}%
+ \def\citeauthoryear##1##2##3{##2\betweenauthoryear##3}\@internalcite}
+\def\shortciteA{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{%
+ ##1\if@tempswa \beforenote##2\fi\citeends}%
+ \def\citeauthoryear##1##2##3{##2 \citestarts##3}\@citedata}
+\def\shortciteB{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1}%
+ \def\citeauthoryear##1##2##3{##2 \citestarts##3\citeends}\@citedata}
+\def\shortciteauthor{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{%
+ ##1\if@tempswa \beforenote##2\fi}%
+ \def\citeauthoryear##1##2##3{##2}\@citedata}
+%
+\def\citeyear{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{%
+ \citestarts##1\if@tempswa \beforenote##2\fi\citeends}%
+ \def\citeauthoryear##1##2##3{##3}\@citedata}
+%
+\def\@citedata{\@ifnextchar[{\@tempswatrue\@citedatax}{\@tempswafalse\@citedatax[]}}
+%
+\def\@citedatax[#1]#2{%
+\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{\betweencites}\@ifundefined
+ {b@\@citeb}{{\bf ?}\@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}
+{\csname b@\@citeb\endcsname}}}{#1}}
+%
+\def\@citex[#1]#2{%
+\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{\betweencites}\@ifundefined
+ {b@\@citeb}{{\bf ?}\@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}
+%
+% (from apalike.sty)
+% No labels in the bibliography.
+% Set length of hanging indentation for bibliography entries.
+\def\@biblabel#1{}
+\newlength{\bibhang}
+%\setlength{\bibhang}{1em} % ORIGINAL
+\setlength{\bibhang}{0.5em} % DAFx-06
+%
+\def\thebibliography#1{%
+ \section*{\bibname}
+ \addcontentsline{toc}{part}{\bibname}
+ \list
+ {\relax}{\setlength{\labelsep}{0em}
+ \setlength{\itemindent}{-\bibhang}
+ \setlength{\leftmargin}{\bibhang}}
+% \def\newblock{\hskip .11em plus .33em minus .07em} % ORIGINAL
+ \def\newblock{\hskip 0em plus 0.0em minus .07em} % DAFx-06
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.=1000\relax}
+%
+%
+%
+%%% Sectioning
+
+\def\newapasectioning{
+ \newlength{\sectionheadwidth}
+ \setlength{\sectionheadwidth}{\textwidth}
+ \addtolength{\sectionheadwidth}{-8em}
+ \let\@internalsection\section
+ \let\@internalsubsection\subsection
+ \let\@internalsubsubsection\subsubsection
+ \let\@internalparagraph\paragraph
+ \let\@internalsubparagraph\subparagraph
+ % Level 1
+ \def\section{\@ifnextchar *{\a@sections}{\a@section}}
+ \def\a@sections##1##2{%
+ \@internalsection*{%
+ \centering\parbox{%
+ \sectionheadwidth}{%
+ \centering\normalsize\bf\uppercase{##2}}\@mkboth{##2}{##2}}}
+ \def\a@section##1{%
+ \addcontentsline{toc}{section}{##1}
+ \@internalsection*{%
+ \centering\parbox{%
+ \sectionheadwidth}{%
+ \centering\normalsize\bf\uppercase{##1}}\@mkboth{##1}{##1}}}
+ % Level 2
+ \def\subsection{\@ifnextchar *{\a@subsections}{\a@subsection}}
+ \def\a@subsections##1##2{%
+ \@internalsubsection*{%
+ \centering\parbox{\sectionheadwidth}{\centering\normalsize\bf##2}}}
+ \def\a@subsection##1{%
+ \addcontentsline{toc}{subsection}{##1}
+ \@internalsubsection*{%
+ \centering\parbox{\sectionheadwidth}{\centering\normalsize\bf##1}}}
+ % Level 3
+ \def\subsubsection{\@ifnextchar *{\a@subsubsections}{\a@subsubsection}}
+ \def\a@subsubsections##1##2{%
+ \@internalsubsubsection*{%
+ \centering\parbox{%
+ \sectionheadwidth}{\centering\normalsize\underbar{##2}}}}
+ \def\a@subsubsection##1{%
+ \addcontentsline{toc}{subsubsection}{##1}
+ \@internalsubsubsection*{%
+ \centering\parbox{%
+ \sectionheadwidth}{\centering\normalsize\underbar{##1}}}}
+ % Level 4
+ \def\a@paragraph##1{%
+ \@internalsubsubsection*{\normalsize\underbar{##1}}}
+ % Level 5
+ \def\a@subparagraph##1{%
+ \@internalsubparagraph*{\normalsize\underbar{##1}.}}
+ % table of contents
+ \def\tableofcontents{%
+ \section*{Contents}\@starttoc{toc}}
+ % list of figures
+ \def\listoffigures{%
+ \section*{List of Figures}\@starttoc{lof}}
+ % list of tables
+ \def\listoftables{%
+ \section*{List of Tables}\@starttoc{lot}}
+ % Change : to . in Figure/Table Caption
+ \long\def\@makecaption##1##2{
+ \vskip 10pt
+ \setbox\@tempboxa\hbox{##1. ##2}
+ \ifdim \wd\@tempboxa >\hsize ##1. ##2\par \else \hbox
+ to\hsize{\hfil\box\@tempboxa\hfil}
+ \fi}
+}